summaryrefslogtreecommitdiffstats
path: root/build/creating_data/download-pip.sh
diff options
context:
space:
mode:
Diffstat (limited to 'build/creating_data/download-pip.sh')
-rwxr-xr-xbuild/creating_data/download-pip.sh11
1 files changed, 7 insertions, 4 deletions
diff --git a/build/creating_data/download-pip.sh b/build/creating_data/download-pip.sh
index dea60b52..fd4a4363 100755
--- a/build/creating_data/download-pip.sh
+++ b/build/creating_data/download-pip.sh
@@ -16,6 +16,10 @@
#
# COPYRIGHT NOTICE ENDS HERE
+
+# Load common-functions library
+. $(dirname ${0})/../common-functions.sh
+
LIST_FILE="$1"
if [[ -z "$LIST_FILE" ]]; then
echo "Missing list file"
@@ -30,16 +34,15 @@ 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"
cd "$outdir"
-while read -r line; do
+for line in $(clean_list "$LIST_FILE)"; do
echo "Downloading $cnt / $lines: $line"
pip download $line
cnt=$((cnt+1))
-
-done < "$LIST_FILE"
+done