Permalink
Browse files

Merge pull request #12 from rcc/master

makes tokenizing git-svn show-externals output more reliable
  • Loading branch information...
2 parents 018f649 + c37c4ae commit cc6a2ffd146bfbf438478b19ab0e50dacd3b6561 @andrep committed Nov 10, 2011
Showing with 10 additions and 5 deletions.
  1. +2 −1 git-svn-clone-externals
  2. +8 −4 git-svn-externals-update
View
@@ -96,7 +96,8 @@ function is_excluded()
}
-git svn show-externals|grep -vE '#|^$'|while read -a words
+git svn show-externals|grep -vE '#|^$'| \
+ sed 's/\(-r\)[ ]*\([0-9]\{1,\}\)/\1\2/'|while read -a words
do
[ -z "${words[*]}" ] && continue
View
@@ -1,11 +1,15 @@
#!/bin/bash
-for dir in *; do
+toplevel_directory="$(git rev-parse --show-cdup)"
+[ -n "$toplevel_directory" ] && { echo "please run from the toplevel directory"; exit 1; }
+
+find .git_externals -type d -name .git | while read gitdir; do
+ dir=$(dirname "$gitdir")
if [ -d $dir ]; then
- cd $dir
+ pushd $dir
echo $dir
git svn fetch
git svn rebase
- cd ..
+ popd
fi
-done
+done

0 comments on commit cc6a2ff

Please sign in to comment.