We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 1971a37 commit 3625dc6Copy full SHA for 3625dc6
docker/build_scripts/prefetch.sh
@@ -1,6 +1,6 @@
1
#!/bin/bash
2
# Prefetch tarballs so they don't need to be fetched in the container (which has
3
-# very old tools). Requires Bash 4.0+, but this is not run inside the build context.
+# very old tools).
4
#
5
# usage: prefetch.sh <output_dir> [name ...]
6
set -ex
@@ -15,9 +15,10 @@ MY_DIR=$(dirname "${BASH_SOURCE[0]}")
15
cd "$SOURCES"
16
17
for name in "$@"; do
18
- root=${name^^}_ROOT
19
- ext=${name^^}_EXTENSION
20
- url=${name^^}_DOWNLOAD_URL
+ name_upper=$(echo "${name}" | tr [:lower:] [:upper:])
+ root=${name_upper}_ROOT
+ ext=${name_upper}_EXTENSION
21
+ url=${name_upper}_DOWNLOAD_URL
22
file=${!root}${!ext:-.tar.gz}
23
fetch_source $file ${!url}
24
done
0 commit comments