diff --git a/scripts/pkgmeek b/scripts/pkgmeek index e073b85..de2156e 100755 --- a/scripts/pkgmeek +++ b/scripts/pkgmeek @@ -548,6 +548,10 @@ refresh_signature() { fi } +interrupted() { + error "Interrupted."; cleanup_work; exit 1 +} + cleanup_work() { [ "$PKGMK_KEEP_WORK" = "yes" ] || { cd "$PKGMK_ROOT"; rm -rf "$work"; } } @@ -585,5 +589,6 @@ readonly -f main info warning error print_help parse_options validate_pkgfile \ check_reqvars check_pkg_mtime fetch_url cat_manifest check_manifest \ cat_signature check_signature parse_signify_output refresh_signature \ cleanup_work recursive +trap "interrupted" SIGHUP SIGINT SIGQUIT SIGTERM main "$@"