Unverified Commit e9beac80 authored by Tommaso Tocci's avatar Tommaso Tocci
Browse files

download script: kill backround job on interruption

parent 8d3ccb92
Loading
Loading
Loading
Loading
+5 −0
Original line number Diff line number Diff line
@@ -5,6 +5,11 @@
COMMON_WGET_FLAGS="--no-verbose"
COMMON_GIT_FLAGS="--quiet --single-branch"

# Stop all backround jobs on interruption.
# "kill -- -$$" sends a SIGTERM to the whole process group,
# thus killing also descendants.
trap "trap - SIGTERM && kill -- -$$" SIGINT SIGTERM EXIT

clonedeps() {
    local FOLDER=$1
    local REPO=$2