From: Nicolas Boisselier Date: Fri, 3 Jul 2015 22:56:21 +0000 (+0100) Subject: nb-update exit code X-Git-Url: https://git.nbdom.net/?a=commitdiff_plain;h=b109be65eaa466b01bdd310df2a5f2c6d141770a;p=nb.git nb-update exit code --- diff --git a/bin/nb-update b/bin/nb-update index 8a4c0d53..2d007e4d 100755 --- a/bin/nb-update +++ b/bin/nb-update @@ -24,6 +24,7 @@ nb-install ##################################################################### # Others git repos from nbdom # +ex=0 for repo in \ /opt/backup_servers \ /{opt,home/www}/rent \ @@ -43,10 +44,13 @@ for repo in \ else su $user -c "cd \"$repo\" && git pull" fi + ret=$? + [ "$ret" != "0" ] && ex=$ret done ##################################################################### # End # -echo ">OK" +[ "$ex" == "0" ] && echo ">OK" +exit $ex