]> git.mxchange.org Git - jprojects-scripts.git/commitdiff
Continued:
authorRoland Häder <roland@mxchange.org>
Sat, 25 Jun 2022 13:39:26 +0000 (15:39 +0200)
committerRoland Häder <roland@mxchange.org>
Sat, 25 Jun 2022 13:39:26 +0000 (15:39 +0200)
- exit on errors

pull-stick.sh

index 3170929fd0df7443eb23b6cb24d317cad6fcd94e..3406617efd9b1cb6f6a2e26782688d34a8f76fa9 100755 (executable)
@@ -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