Add a trap for Ctrl+C

This commit is contained in:
Tianon Gravi 2015-01-21 11:27:22 -07:00
parent e959cb42f1
commit d2954894e7
1 changed files with 3 additions and 0 deletions

View File

@ -1,6 +1,9 @@
#!/bin/bash
set -e
# make sure we can GTFO
trap 'echo >&2 Ctrl+C captured, exiting; exit 1' SIGINT
# so we can have fancy stuff like !(pattern)
shopt -s extglob