Skip to content

Commit 28098db

Browse files
committed
Fix command evaluation
1 parent 69d4243 commit 28098db

File tree

1 file changed

+7
-4
lines changed

1 file changed

+7
-4
lines changed

tools/scripts/download

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -40,15 +40,18 @@ fi
4040

4141
# Determine the command for downloading a resource...
4242
if [[ -x "${CURL}" ]] && "${CURL}" -V >/dev/null; then
43-
get="${CURL} ${curl_opts}"
43+
get="${CURL}"
44+
opts="${curl_opts}"
4445
elif [[ -x "${WGET}" ]] && "${WGET}" -V >/dev/null; then
45-
get="${WGET} ${wget_opts}"
46+
get="${WGET}"
47+
opts="${wget_opts}"
4648
elif [[ -x "${FETCH}" ]]; then
47-
get="${FETCH} ${fetch_opts}"
49+
get="${FETCH}"
50+
opts="${fetch_opts}"
4851
else
4952
echo 'ERROR: missing dependency. Please download either curl, wget, or fetch. Once installed, run the command again.' >&2
5053
exit 1
5154
fi
5255

5356
# Download the resource:
54-
"${get} ${url}"
57+
eval "${get} ${opts} ${url}"

0 commit comments

Comments
 (0)