From 5284c12274f0d81dc2fac978cc703072897696fd Mon Sep 17 00:00:00 2001 From: Erich Eckner Date: Mon, 3 Jul 2017 12:31:30 +0200 Subject: bin/get-package-updates: do nothing if nothing changed --- bin/get-package-updates | 11 +++++++++++ 1 file changed, 11 insertions(+) (limited to 'bin/get-package-updates') diff --git a/bin/get-package-updates b/bin/get-package-updates index b292932..12ae82f 100755 --- a/bin/get-package-updates +++ b/bin/get-package-updates @@ -101,6 +101,8 @@ done # Read previous git revision numbers from files. +something_new=false + for repo in ${repo_names}; do eval "old_repo_revisions__${repo}='$( cat "${work_dir}/${repo}.revision" 2> /dev/null || \ @@ -111,8 +113,17 @@ for repo in ${repo_names}; do git -C "${repo_path}" rev-parse HEAD | \ tee "${work_dir}/${repo}.revision.new" )'" + eval 'if ! [ "${new_repo_revisions__'"${repo}"'}" = "${old_repo_revisions__'"${repo}"'}" ]; then + something_new=true + fi' done +if ${pull} && \ + ! ${something_new}; then + >&2 echo 'Nothing changed.' + exit +fi + # Create a lock file for build list. exec 9> "${build_list_lock_file}" -- cgit v1.2.3-70-g09d2