From e0190820046744b465b97da7dcc9146f030fa811 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Roland=20H=C3=A4der?= Date: Sat, 25 Jun 2022 15:39:26 +0200 Subject: [PATCH] Continued: - exit on errors --- pull-stick.sh | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/pull-stick.sh b/pull-stick.sh index 3170929..3406617 100755 --- a/pull-stick.sh +++ b/pull-stick.sh @@ -19,25 +19,25 @@ for project in ${LIST}; do if [ "$1" = "c" ] then echo "$0: Checkout '${project}' ..." - git checkout -- . + git checkout -- . || exit 255 elif [ "$1" = "r" ] then echo "$0: Resetting '${project}' ..." - git reset --hard + git reset --hard || exit 255 fi echo "$0: Pulling '${project}' ..." if [ "$1" = "a" ] then - git pull --all + git pull --all || exit 255 else - git pull -S origin master - git fetch upstream - git fetch transport + git pull -S origin master || exit 255 + git fetch upstream || exit 255 + git fetch transport || exit 255 fi echo "$0: Merging upstream into '${project}' ..." - git merge -S upstream/master + git merge -S upstream/master || exit 255 if [ "$1" != "s" -a "$1" != "a" ] then -- 2.39.5