aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/src/scripts/download.sh
diff options
context:
space:
mode:
Diffstat (limited to 'src/scripts/download.sh')
-rwxr-xr-xsrc/scripts/download.sh14
1 files changed, 13 insertions, 1 deletions
diff --git a/src/scripts/download.sh b/src/scripts/download.sh
index 2ed5d12..cf79b8c 100755
--- a/src/scripts/download.sh
+++ b/src/scripts/download.sh
@@ -39,8 +39,15 @@
39# | | 39# | |
40# +-=-=-=-=-=-+ 40# +-=-=-=-=-=-+
41 41
42# set program name for errors 42# set PROG_NAME and load profile
43PROG_NAME="$(basename "${0}")" 43PROG_NAME="$(basename "${0}")"
44IPERD_PROFILE="$(dirname "${0}")/iperd.profile"
45if test ! -f "${IPERD_PROFILE}";then
46 echo "${PROG_NAME}: unable to find iperd.profile" 1>&2;
47 exit 1;
48fi
49. "${IPERD_PROFILE}"
50
44 51
45# set logging function 52# set logging function
46LOGGER="/usr/bin/sed -e s/^/${PROGRAM_NAME}:/g" 53LOGGER="/usr/bin/sed -e s/^/${PROGRAM_NAME}:/g"
@@ -145,6 +152,7 @@ unset HASH_FILE
145unset HASH_DATA 152unset HASH_DATA
146unset KEEPTEMPFILE 153unset KEEPTEMPFILE
147unset EXTRACT_MKTEMP 154unset EXTRACT_MKTEMP
155unset WGET_FLAGS
148 156
149 157
150# parse CLI arguments 158# parse CLI arguments
@@ -183,6 +191,9 @@ fi
183 191
184 192
185# adjust options 193# adjust options
194if test "x${CONFIG_TLS_CHECK}" == "xno";then
195 WGET_FLAGS="${WGET_FLAGS} --no-check-certificate";
196fi
186if test -z "${TMPFILE}";then 197if test -z "${TMPFILE}";then
187 TMPFILE="${FILE}.tmp" 198 TMPFILE="${FILE}.tmp"
188fi 199fi
@@ -240,6 +251,7 @@ trap cleanup SIGHUP SIGINT SIGTERM EXIT
240if test ! -f "${TMPFILE}" && test ! -f "${FILE}";then 251if test ! -f "${TMPFILE}" && test ! -f "${FILE}";then
241 mkdir -p "$(dirname "${TMPFILE}")" || exit 1; 252 mkdir -p "$(dirname "${TMPFILE}")" || exit 1;
242 wget \ 253 wget \
254 ${WGET_FLAGS} \
243 -q \ 255 -q \
244 -O "${TMPFILE}.new" \ 256 -O "${TMPFILE}.new" \
245 "${URL}" \ 257 "${URL}" \