From d125b20fad512bc3e7e14812c9d28176a1d4c167 Mon Sep 17 00:00:00 2001 From: Jan Lindemann Date: Thu, 13 Dec 2018 18:08:21 +0000 Subject: [PATCH] purge-stale-projects.sh: Fix premature exit purge-stale-projects.sh exited prematurely because of set -e, fixed that Signed-off-by: Jan Lindemann --- scripts/purge-stale-projects.sh | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/scripts/purge-stale-projects.sh b/scripts/purge-stale-projects.sh index 8a638d3e..5dea1492 100644 --- a/scripts/purge-stale-projects.sh +++ b/scripts/purge-stale-projects.sh @@ -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