From fa64e92fc1f2cd7cc87b87f0d787c0ac4751d607 Mon Sep 17 00:00:00 2001 From: Erich Eckner Date: Sat, 8 Jul 2023 10:34:28 +0200 Subject: bin/harvest-commit-times: add force flag to ignore errors --- bin/harvest-commit-times | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) (limited to 'bin') diff --git a/bin/harvest-commit-times b/bin/harvest-commit-times index 21855ff..24e1616 100755 --- a/bin/harvest-commit-times +++ b/bin/harvest-commit-times @@ -12,6 +12,7 @@ usage() { >&2 echo ' sources from git and put them into the database' >&2 echo '' >&2 echo 'possible options:' + >&2 echo ' -f|--force: Do not abort on error.' >&2 echo ' -h|--help: Show this help and exit.' >&2 echo ' -w|--wait: If necessary, wait for lock blocking.' [ -z "$1" ] && exit 1 || exit "$1" @@ -26,9 +27,13 @@ eval set -- "$( )" block_flag='-n' +force=false; while true; do case "$1" in + -f|--force) + force=true + ;; -h|--help) usage 0 ;; @@ -119,7 +124,9 @@ while true; do >&2 printf '%s ' \ "${pkgbase}" "${git_revision}" "${mod_git_revision}" "${repository}" "${architecture}" >&2 printf '\n' - exit 2 + if ! ${force}; then + exit 2 + fi fi done > \ "${tmp_file}" -- cgit v1.2.3-70-g09d2