From 82043fcf809594ef219b1091cddad42a9859dbdd Mon Sep 17 00:00:00 2001 From: Maxim Baz Date: Sat, 2 Sep 2017 14:20:55 +0200 Subject: [PATCH] Use different exit code on updates check Enables some scripting, e.g. putting this in a cron job: ./update.sh --check && --- update.sh | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/update.sh b/update.sh index b0fc9766..6abf4022 100755 --- a/update.sh +++ b/update.sh @@ -51,10 +51,11 @@ case "${1}" in git fetch origin ${BRANCH} if ! git diff origin/${BRANCH} --quiet; then echo "Updated code is available." + exit 0 else echo "No updates available." + exit 3 fi - exit 0 ;; esac