create-model-dockerfile.sh: Pass original tarball name to Dockerfile
There're >1 tarball naming patterns as of now, so approach of
(lossly) deconstructing tarball name into parts and then
reconstructing it no longer works. Just use the original name,
voila.
Signed-off-by: Paul Sokolovsky <paul.sokolovsky@linaro.org>
Change-Id: Ibe6f0aba1154400612c58f0bf7aa84ac1b5716f7
diff --git a/create-model-dockerfile.sh b/create-model-dockerfile.sh
index ce7aa26..bd4d61e 100755
--- a/create-model-dockerfile.sh
+++ b/create-model-dockerfile.sh
@@ -36,7 +36,7 @@
}
function main() {
- local tarball=$1
+ TARBALL=$1
local target_dir=$2
# get MODEL and MODEL_VER
@@ -49,6 +49,7 @@
# replace template macros with real model values
sed -e "s|\${OS}|${OS}|g" \
-e "s|\${OS_VER}|${OS_VER}|g" \
+ -e "s|\${TARBALL}|${TARBALL}|g" \
-e "s|\${MODEL}|${MODEL}|g" \
-e "s|\${MODEL_VER}|${MODEL_VER}|g" \
-e "s|\${MODEL_DIR}|${MODEL_DIR}|g" < dockerfile-template > $target_dir/Dockerfile
diff --git a/dockerfile-template b/dockerfile-template
index 97485c3..b518e19 100644
--- a/dockerfile-template
+++ b/dockerfile-template
@@ -29,7 +29,7 @@
# Add the FVP model tarball
# NOTE: some tarballs contain an installer script others don't, so it may be the case
# that the ADD instruction do install the model under /opt/model
-ADD ${MODEL}_${MODEL_VER}.tgz .
+ADD ${TARBALL} .
# Install packages and model
RUN ${MODEL_DIR}/${MODEL}.sh \