summaryrefslogtreecommitdiff
path: root/bin/delete-packages
diff options
context:
space:
mode:
Diffstat (limited to 'bin/delete-packages')
-rwxr-xr-xbin/delete-packages25
1 files changed, 19 insertions, 6 deletions
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.