summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBartek Grzybowski <b.grzybowski@partner.samsung.com>2020-09-24 12:09:22 +0200
committerBartek Grzybowski <b.grzybowski@partner.samsung.com>2020-09-24 12:09:22 +0200
commit9a2fb193f53da8daf69e089f027838674d01d1bc (patch)
tree5d42edfaca29772ad04c75d1f827bacb6d732956
parent2240a2a1eb93442f7daa7171b1ff480087697673 (diff)
Create directory for output list file if it doesn't exist
Should the output list file directory passed as second param not exist the script would fail. Change-Id: I4586df54b42eba2ace49f6aaf03b68042354b44a Issue-ID: OOM-2578 Signed-off-by: Bartek Grzybowski <b.grzybowski@partner.samsung.com>
-rwxr-xr-xbuild/creating_data/docker-images-collector.sh5
1 files changed, 5 insertions, 0 deletions
diff --git a/build/creating_data/docker-images-collector.sh b/build/creating_data/docker-images-collector.sh
index 8789350c..a9129c8c 100755
--- a/build/creating_data/docker-images-collector.sh
+++ b/build/creating_data/docker-images-collector.sh
@@ -82,6 +82,11 @@ if [ ! -f "${PROJECT_DIR}/../Makefile" ]; then
elif [ -z "${LIST}" ]; then
mkdir -p ${LISTS_DIR}
LIST="${LISTS_DIR}/${PROJECT}_docker_images.list"
+else
+ # $2 is not empty - ensure LIST path exists
+ LIST_DIR="$(dirname ${LIST})"
+ mkdir -p "${LIST_DIR}"
+ MSG="${LIST_DIR} didn't exist, created\n"
fi
if [ -e "${LIST}" ]; then