summaryrefslogtreecommitdiff
path: root/bin
diff options
context:
space:
mode:
authorErich Eckner <git@eckner.net>2021-03-25 09:18:54 +0100
committerErich Eckner <git@eckner.net>2021-03-25 09:18:54 +0100
commit4d554fb634b4f4c16bc5912af697476595326986 (patch)
tree3fbff7c88396aab079d4126a9472b13f33667a4c /bin
parentb96e714b4daf599b88166999d5009317b6e02576 (diff)
downloadbuilder-4d554fb634b4f4c16bc5912af697476595326986.tar.xz
bin/nit-picker: -x new
Diffstat (limited to 'bin')
-rwxr-xr-xbin/nit-picker11
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