Commit 7f74be02 authored by Marc Vef's avatar Marc Vef
Browse files

Merge branch 'fix_dl_script' into 'master'

ensure folder creation on download script

See merge request zdvresearch_bsc/adafs!20
parents 8d3ccb92 5e849c77
Loading
Loading
Loading
Loading
+6 −2
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
@@ -30,9 +35,8 @@ wgetdeps() {
    URL=$2
    if [ -d "${SOURCE}/${FOLDER}" ]; then
        rm -rf "${SOURCE}/${FOLDER}"
    else
        mkdir -p "${SOURCE}/${FOLDER}"
    fi
    mkdir -p "${SOURCE}/${FOLDER}"
    cd ${SOURCE}
    FILENAME=$(basename $URL)
    if [ -f "${SOURCE}/$FILENAME" ]; then