From: Zoran Zaric Date: Mon, 24 Sep 2012 22:30:14 +0000 (+0200) Subject: Catch ^C in import-rdiff-backup X-Git-Tag: bup-0.25-rc2~134 X-Git-Url: https://arthur.barton.de/gitweb/?a=commitdiff_plain;h=f73f6465b6e0dfd6e5ab7830b666769cc733299b;p=bup.git Catch ^C in import-rdiff-backup Signed-off-by: Zoran Zaric Reviewed-by: Gabriel Filion --- diff --git a/cmd/import-rdiff-backup-cmd.sh b/cmd/import-rdiff-backup-cmd.sh index 8285e0f..5310eb6 100755 --- a/cmd/import-rdiff-backup-cmd.sh +++ b/cmd/import-rdiff-backup-cmd.sh @@ -9,6 +9,13 @@ usage() { exit 1 } +control_c() { + echo "bup import-rdiff-backup: signal 2 received" 1>&2 + exit 128 +} + +trap control_c INT + dry_run= while [ "$1" = "-n" -o "$1" = "--dry-run" ]; do dry_run=echo