summaryrefslogtreecommitdiffstats
path: root/build/creating_data/download-files.sh
diff options
context:
space:
mode:
Diffstat (limited to 'build/creating_data/download-files.sh')
-rwxr-xr-xbuild/creating_data/download-files.sh13
1 files changed, 8 insertions, 5 deletions
diff --git a/build/creating_data/download-files.sh b/build/creating_data/download-files.sh
index 89e2026c..f687fda1 100755
--- a/build/creating_data/download-files.sh
+++ b/build/creating_data/download-files.sh
@@ -16,7 +16,11 @@
#
# COPYRIGHT NOTICE ENDS HERE
-LIST_FILE="$1"
+
+# Load common-functions library
+. $(dirname ${0})/../common-functions.sh
+
+LIST_FILE="${1}"
if [[ -z "$LIST_FILE" ]]; then
echo "Missing list file"
exit 1
@@ -28,13 +32,13 @@ if [[ -z "$outdir" ]]; then
exit 1
fi
-lines=$(cat "$LIST_FILE" | wc -l)
+lines=$(clean_list "$LIST_FILE" | wc -l)
cnt=1
# create output dir if not exists
mkdir -p "$outdir"
-while read -r line; do
+for line in $(clean_list "$LIST_FILE"); do
# www.springframework.org/schema/tool/spring-tool-4.3.xsd
file="${line%%\?*}"
filename=$(basename "$file")
@@ -43,5 +47,4 @@ while read -r line; do
# drop below 10b/10s
curl --retry 5 -y 10 -Y 10 --location "$line" -o "$outdir/$filename" &>/dev/null
cnt=$((cnt+1))
-
-done < "$LIST_FILE"
+done \ No newline at end of file