Skip to content

Commit

Permalink
Merge pull request andrep#12 from rcc/master
Browse files Browse the repository at this point in the history
makes tokenizing git-svn show-externals output more reliable
  • Loading branch information
andrep committed Nov 10, 2011
2 parents 018f649 + c37c4ae commit cc6a2ff
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 5 deletions.
3 changes: 2 additions & 1 deletion git-svn-clone-externals
Expand Up @@ -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

Expand Down
12 changes: 8 additions & 4 deletions git-svn-externals-update
@@ -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.