diff options
author | Erich Eckner <git@eckner.net> | 2021-03-25 09:18:54 +0100 |
---|---|---|
committer | Erich Eckner <git@eckner.net> | 2021-03-25 09:18:54 +0100 |
commit | 4d554fb634b4f4c16bc5912af697476595326986 (patch) | |
tree | 3fbff7c88396aab079d4126a9472b13f33667a4c /bin/nit-picker | |
parent | b96e714b4daf599b88166999d5009317b6e02576 (diff) | |
download | builder-4d554fb634b4f4c16bc5912af697476595326986.tar.xz |
bin/nit-picker: -x new
Diffstat (limited to 'bin/nit-picker')
-rwxr-xr-x | bin/nit-picker | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/bin/nit-picker b/bin/nit-picker index d313586..3fb558e 100755 --- a/bin/nit-picker +++ b/bin/nit-picker @@ -19,14 +19,16 @@ # shellcheck disable=SC2016 print_usage() { - >&2 echo 'usage: nit-picker [-n|-r] [$single_test]' + >&2 echo 'usage: nit-picker [-n|-r|-x] [$single_test]' >&2 echo ' -n: Do not join irc.' >&2 echo ' -r: Remove superfluid dependencies in the database.' >&2 echo ' To avoid catastrophic breakage, this option requires' >&2 echo ' $single_test being set.' + >&2 echo ' -x: Exit upon first found inconsistency.' >&2 echo ' $single_test: Only execute the given test.' } +exit_fast=false irc=true repair_dependencies=false @@ -40,6 +42,10 @@ while [ $# -ge 1 ]; do >&2 echo 'repair all wrong dependencies (remove superfluid, add missing)' repair_dependencies=true ;; + '-x') + >&2 echo 'exit, when the first inconsistency is being found' + exit_fast=true + ;; '-*') >&2 printf 'unknown option "%s"\n' "$1" print_usage @@ -125,6 +131,9 @@ local_irc_say() { else sed 's/^/irc: /' fi + if ${exit_fast}; then + exit 1 + fi if ! ${single_run}; then sleep 60 fi |