[Pkg-ocaml-maint-commits] r6188 - /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 10:02:37 UTC 2009
Author: dogguy-guest
Date: Wed Feb 18 10:02:37 2009
New Revision: 6188
URL: http://svn.debian.org/wsvn/?sc=1&rev=6188
Log:
Creating sections for svn packages in mrconfig
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=6188&op=diff
==============================================================================
--- trunk/projects/git-guide/d-o-m-mrconfig.sh (original)
+++ trunk/projects/git-guide/d-o-m-mrconfig.sh Wed Feb 18 10:02:37 2009
@@ -1,27 +1,46 @@
#!/bin/bash
set -e
+echo "I: Setting up output file"
OUTPUT="$1"
-
if [ -z "$OUTPUT" ] ; then
OUTPUT="$PWD/mrconfig"
fi
echo "I: Retreiving package list"
-REPODIR="/git/pkg-ocaml-maint/packages/"
-PKGS=`ssh alioth.debian.org ls -1 $REPODIR`
+
+# 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/\///'`
+
+# Packages not migrated to Git
+SVN_REMAINING_PKGS=`echo "${SVN_PKGS// /\n}" | grep -F "${GIT_PKGS// /\n}" -x -v`
echo "I: Generating mrconfig file in $OUTPUT"
+
+# Reset output file (is this necessary?)
echo "" > $OUTPUT
-for i in $PKGS; do
- PKG=`echo $i | sed 's/.git$//'`
- echo "[$PKG]
+
+# Sections for Git repositories
+for i in $GIT_PKGS; do
+ echo "[$i]
checkout =
- git clone git+ssh://git.debian.org/$REPODIR$i &&
- cd $PKG &&
+ git clone git+ssh://git.debian.org$GIT_REPODIR$i.git &&
+ cd $i.git &&
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
+done
+
echo "I: all done, enjoy: mr -c $OUTPUT [checkout,update,...]"
More information about the Pkg-ocaml-maint-commits
mailing list