[Pkg-ocaml-maint-commits] r6190 - /trunk/projects/git-guide/d-o-m-mrconfig.sh
dogguy-guest at users.alioth.debian.org
dogguy-guest at users.alioth.debian.org
Wed Feb 18 11:47:38 UTC 2009
Author: dogguy-guest
Date: Wed Feb 18 11:47:38 2009
New Revision: 6190
URL: http://svn.debian.org/wsvn/?sc=1&rev=6190
Log:
- Fix a typo: cd $i instead of cd $i.git
- New hierarchy:
.
|_ packages
| |_ {all packages}
|_ projects
|_ tools
Modified:
trunk/projects/git-guide/d-o-m-mrconfig.sh
Modified: trunk/projects/git-guide/d-o-m-mrconfig.sh
URL: http://svn.debian.org/wsvn/trunk/projects/git-guide/d-o-m-mrconfig.sh?rev=6190&op=diff
==============================================================================
--- trunk/projects/git-guide/d-o-m-mrconfig.sh (original)
+++ trunk/projects/git-guide/d-o-m-mrconfig.sh Wed Feb 18 11:47:38 2009
@@ -1,46 +1,65 @@
#!/bin/bash
set -e
-echo "I: Setting up output file"
+function msg() {
+ echo "I: $1"
+}
+
+function output() {
+ echo "$1" >> $OUTPUT
+}
+
+msg "Setting up output file"
OUTPUT="$1"
if [ -z "$OUTPUT" ] ; then
- OUTPUT="$PWD/mrconfig"
+ OUTPUT="mrconfig"
fi
-echo "I: Retreiving package list"
+msg "Retreiving package list"
# Packages hosted in Git
GIT_REPODIR="/git/pkg-ocaml-maint/packages/"
GIT_PKGS=`ssh alioth.debian.org ls -1 $GIT_REPODIR | sed 's/.git$//'`
# Packages hosted in Svn
-SVN_REPODIR="svn+ssh://svn.debian.org/svn/pkg-ocaml-maint/trunk/packages"
-SVN_PKGS=`svn ls $SVN_REPODIR | grep -v git-repo | sed 's/\///'`
+SVN_REPODIR="svn+ssh://svn.debian.org/svn/pkg-ocaml-maint/trunk"
+SVN_PKGS=`svn ls $SVN_REPODIR/packages | grep -v git-repo | sed 's/\///'`
# Packages not migrated to Git
SVN_REMAINING_PKGS=`echo "${SVN_PKGS}" | grep -F "${GIT_PKGS}" -x -v`
-echo "I: Generating mrconfig file in $OUTPUT"
+msg "Generating mrconfig file in $OUTPUT"
# Reset output file (is this necessary?)
echo "" > $OUTPUT
# Sections for Git repositories
for i in $GIT_PKGS; do
- echo "[$i]
+ output "[packages/$i]
checkout =
git clone git+ssh://git.debian.org$GIT_REPODIR$i.git &&
- cd $i.git &&
+ cd $i &&
git branch --track upstream remotes/origin/upstream &&
git branch --track pristine-tar remotes/origin/pristine-tar
-" >> $OUTPUT
+"
done
# Sections for Svn repositories
for i in $SVN_REMAINING_PKGS; do
- echo "[$i]
-checkout = svn co $SVN_REPODIR/$i
-" >> $OUTPUT
+ output "[packages/$i]
+checkout = svn co $SVN_REPODIR/packages/$i
+"
done
-echo "I: all done, enjoy: mr -c $OUTPUT [checkout,update,...]"
+msg "Setting up sections for projects and tools"
+
+# Adding projects and tools
+output "[projects]
+checkout = svn co $SVN_REPODIR/projects
+
+[tools]
+checkout = svn co $SVN_REPODIR/tools
+"
+
+# Finish
+msg "all done, enjoy: mr -c $OUTPUT [checkout,update,...]"
More information about the Pkg-ocaml-maint-commits
mailing list