index : builder | |
Archlinux32 build system | gitolite user |
summaryrefslogtreecommitdiff |
author | Erich Eckner <git@eckner.net> | 2018-06-07 12:42:48 +0200 |
---|---|---|
committer | Erich Eckner <git@eckner.net> | 2018-06-07 12:42:48 +0200 |
commit | 729723cba75de596329bc54284609f9de266cf05 (patch) | |
tree | 368ee3936e5755c6b27d347f0d02cbc6304a5e12 | |
parent | d93a256e5e78d628e19af15504d3d3c643dbc87f (diff) |
-rwxr-xr-x | bin/delete-packages | 25 |
diff --git a/bin/delete-packages b/bin/delete-packages index 64f5d7b..a1cdd78 100755 --- a/bin/delete-packages +++ b/bin/delete-packages @@ -23,17 +23,24 @@ usage() { >&2 echo ' delete obsolete binary packages.' >&2 echo '' >&2 echo 'possible options:' - >&2 echo ' -f|--force $id: Only delete the selected packages - but delete in any case.' - >&2 echo ' -h|--help: Show this help and exit.' - >&2 echo ' -n|--no-action: Only print what would be deleted.' - >&2 echo ' -w|--wait: If necessary, wait for lock blocking.' + >&2 echo ' -f|--force $id:' + >&2 echo ' Only delete the selected packages - but delete in any case.' + >&2 echo ' -h|--help:' + >&2 echo ' Show this help and exit.' + >&2 echo ' -i|--ignore-insanity:' + >&2 echo ' Do not abort when insane.' + >&2 echo ' -n|--no-action:' + >&2 echo ' Only print what would be deleted.' + >&2 echo ' -w|--wait:' + >&2 echo ' If necessary, wait for lock blocking.' [ -z "$1" ] && exit 1 || exit "$1" } eval set -- "$( - getopt -o f:hnw \ + getopt -o f:hinw \ --long force: \ --long help \ + --long ignore-insanity \ --long no-action \ --long wait \ -n "$(basename "$0")" -- "$@" || \ @@ -42,6 +49,7 @@ eval set -- "$( block_flag='-n' force_ids='' +ignore_insanity=false no_action=false while true @@ -54,6 +62,9 @@ do -h|--help) usage 0 ;; + -i|--ignore-insanity) + ignore_insanity=true + ;; -n|--no-action) no_action=true ;; @@ -74,7 +85,9 @@ done if [ -s "${work_dir}/build-master-sanity" ]; then >&2 echo 'Build master is not sane.' - exit + if ! ${ignore_insanity}; then + exit + fi fi # Create a lock file and a trap. |