Skip to content

Commit c37c4ae

Browse files
committed
make git-svn-externals-update more usable
1 parent ea22ae9 commit c37c4ae

File tree

1 file changed

+8
-4
lines changed

1 file changed

+8
-4
lines changed

git-svn-externals-update

+8-4
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,15 @@
11
#!/bin/bash
22

3-
for dir in *; do
3+
toplevel_directory="$(git rev-parse --show-cdup)"
4+
[ -n "$toplevel_directory" ] && { echo "please run from the toplevel directory"; exit 1; }
5+
6+
find .git_externals -type d -name .git | while read gitdir; do
7+
dir=$(dirname "$gitdir")
48
if [ -d $dir ]; then
5-
cd $dir
9+
pushd $dir
610
echo $dir
711
git svn fetch
812
git svn rebase
9-
cd ..
13+
popd
1014
fi
11-
done
15+
done

0 commit comments

Comments
 (0)