purge-stale-projects.sh: Fix premature exit

purge-stale-projects.sh exited prematurely because of set -e, fixed that

Signed-off-by: Jan Lindemann <jan@janware.com>
This commit is contained in:
Jan Lindemann 2018-12-13 18:08:21 +00:00
commit d125b20fad

View file

@ -22,10 +22,10 @@ check_scm()
if [ -d $p/.git ]; then
log + checking git
#git -C $p pull --no-edit || fatal "git pull failed, giving up"
git -C $p status --porcelain | grep -v '^??' | grep -q . && {
if git -C $p status --porcelain | grep -v '^??' | grep -q . ; then
git -C $p status
fatal "git in project \"$p\" has locally modified files, giving up"
}
fi
else
log + checking cvs
#cvs update -dP $p
@ -95,6 +95,7 @@ for p in $local_git_proj; do
[ -d $p ] || continue
echo $remote_git_proj | grep -q "\(^\| \)$p\($\| \)" && continue
check_scm $p
echo done checking scm
n=purged/git/$date/$p
mkdir -p `dirname $n`
mv $p $n