|
|
@ -52,19 +52,24 @@ while [ $# -gt 0 ]; do |
|
|
|
shift |
|
|
|
done |
|
|
|
|
|
|
|
indent_output() { |
|
|
|
sed -e '/^$/d;' -e 's/^/ /' |
|
|
|
} |
|
|
|
|
|
|
|
# jump to the working tree's root |
|
|
|
# |
|
|
|
cd "$SDEROOT" |
|
|
|
|
|
|
|
tree="${SDEROOT##*/}" |
|
|
|
|
|
|
|
# hunt for the roots of the sub-working trees |
|
|
|
# |
|
|
|
for x in . package $( ls -1d package/* target/* 2> /dev/null ); do |
|
|
|
if [ ! -d "$x" ]; then |
|
|
|
case "$x" in |
|
|
|
package) |
|
|
|
echo -n "$tree/$x: " |
|
|
|
git clone --quiet "$GITSERVER/opensde/$x-nopast.git" "$x" |
|
|
|
echo "$tree/$x:" |
|
|
|
git clone --quiet "$GITSERVER/opensde/$x-nopast.git" "$x" 2>&1 | indent_output |
|
|
|
;; |
|
|
|
*) |
|
|
|
echo "$tree/$x: missing" >&2 |
|
|
@ -72,13 +77,13 @@ for x in . package $( ls -1d package/* target/* 2> /dev/null ); do |
|
|
|
esac |
|
|
|
elif [ -d "$x/.git" ]; then |
|
|
|
cd "$x"; |
|
|
|
echo -n "$tree/$x: " |
|
|
|
git fetch --quiet && git reset && git rebase origin |
|
|
|
echo "$tree/$x:" |
|
|
|
( git fetch --quiet && git reset && git rebase origin ) 2>&1 | indent_output |
|
|
|
cd - > /dev/null |
|
|
|
elif [ -d "$x/.svn" ]; then |
|
|
|
cd "$x"; |
|
|
|
echo -n "$tree/$x: " |
|
|
|
svn up |
|
|
|
echo "$tree/$x:" |
|
|
|
svn up 2>&1 | indent_output |
|
|
|
cd - > /dev/null |
|
|
|
fi |
|
|
|
done |