소스 검색

Use different exit code on updates check

Enables some scripting, e.g. putting this in a cron job:

    ./update.sh --check && <notify-me-about-available-updates>
Maxim Baz 8 년 전
부모
커밋
82043fcf80
1개의 변경된 파일2개의 추가작업 그리고 1개의 파일을 삭제
  1. 2 1
      update.sh

+ 2 - 1
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