summaryrefslogtreecommitdiffstats
path: root/build/creating_data/save-docker-images.sh
diff options
context:
space:
mode:
Diffstat (limited to 'build/creating_data/save-docker-images.sh')
-rwxr-xr-xbuild/creating_data/save-docker-images.sh19
1 files changed, 6 insertions, 13 deletions
diff --git a/build/creating_data/save-docker-images.sh b/build/creating_data/save-docker-images.sh
index 4c764556..0a72d15b 100755
--- a/build/creating_data/save-docker-images.sh
+++ b/build/creating_data/save-docker-images.sh
@@ -19,15 +19,10 @@
# COPYRIGHT NOTICE ENDS HERE
-# boilerplate
-RELATIVE_PATH=../ # relative path from this script to 'common-functions.sh'
-if [ "$IS_COMMON_FUNCTIONS_SOURCED" != YES ] ; then
- SCRIPT_DIR=$(dirname "${0}")
- LOCAL_PATH=$(readlink -f "$SCRIPT_DIR")
- . "${LOCAL_PATH}"/"${RELATIVE_PATH}"/common-functions.sh
-fi
+# Load common-functions library
+. $(dirname ${0})/../common-functions.sh
-LIST="${1}"
+LIST_FILE="${1}"
IMG_DIR="${2}"
if [[ -z "$IMG_DIR" ]]; then
@@ -56,11 +51,9 @@ save_image() {
echo "Save all images"
line=1
-lines=$(wc -l ${LIST})
-while read -r image; do
+lines=$(clean_list "$LIST_FILE" | wc -l)
+for image in $(clean_list "$LIST_FILE"); do
echo "== pkg #$line of $lines =="
-
save_image "${image}"
line=$((line+1))
-
-done < "${LIST}"
+done \ No newline at end of file