Add a trap for Ctrl+C
This commit is contained in:
parent
e959cb42f1
commit
d2954894e7
|
|
@ -1,6 +1,9 @@
|
||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
set -e
|
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)
|
# so we can have fancy stuff like !(pattern)
|
||||||
shopt -s extglob
|
shopt -s extglob
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue