aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBłażej Sowa <[email protected]>2019-01-21 19:42:54 +0100
committerXECDesign <[email protected]>2019-01-22 17:33:18 +1000
commitd88f536536ca3071edb56e85224fdf1c34086a16 (patch)
treec03112ee6ca1245d2334335b03c16c65cacf025b
parent21aeca1b0c1ffd4c3336be31da510315714e87a8 (diff)
IMG_SUFFIX evaluation in export image (fix #241)
-rwxr-xr-xbuild.sh4
-rwxr-xr-xexport-image/03-set-partuuid/00-run.sh2
-rwxr-xr-xexport-image/04-finalise/01-run.sh8
-rwxr-xr-xexport-image/prerun.sh2
-rwxr-xr-xexport-noobs/prerun.sh4
5 files changed, 10 insertions, 10 deletions
diff --git a/build.sh b/build.sh
index c8bca0d..c3417a1 100755
--- a/build.sh
+++ b/build.sh
@@ -144,8 +144,8 @@ fi
export USE_QEMU="${USE_QEMU:-0}"
export IMG_DATE="${IMG_DATE:-"$(date +%Y-%m-%d)"}"
-export IMG_FILENAME="${IMG_FILENAME:-"${IMG_DATE}-${IMG_NAME}${IMG_SUFFIX}"}"
-export ZIP_FILENAME="${ZIP_FILENAME:-"image_${IMG_DATE}-${IMG_NAME}${IMG_SUFFIX}"}"
+export IMG_FILENAME="${IMG_FILENAME:-"${IMG_DATE}-${IMG_NAME}"}"
+export ZIP_FILENAME="${ZIP_FILENAME:-"image_${IMG_DATE}-${IMG_NAME}"}"
BASE_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
export SCRIPT_DIR="${BASE_DIR}/scripts"
diff --git a/export-image/03-set-partuuid/00-run.sh b/export-image/03-set-partuuid/00-run.sh
index e166e97..ec4fd8a 100755
--- a/export-image/03-set-partuuid/00-run.sh
+++ b/export-image/03-set-partuuid/00-run.sh
@@ -1,6 +1,6 @@
#!/bin/bash -e
-IMG_FILE="${STAGE_WORK_DIR}/${IMG_FILENAME}.img"
+IMG_FILE="${STAGE_WORK_DIR}/${IMG_FILENAME}${IMX_SUFFIX}.img"
IMGID="$(dd if="${IMG_FILE}" skip=440 bs=1 count=4 2>/dev/null | xxd -e | cut -f 2 -d' ')"
diff --git a/export-image/04-finalise/01-run.sh b/export-image/04-finalise/01-run.sh
index 501fef3..d4788c7 100755
--- a/export-image/04-finalise/01-run.sh
+++ b/export-image/04-finalise/01-run.sh
@@ -1,7 +1,7 @@
#!/bin/bash -e
-IMG_FILE="${STAGE_WORK_DIR}/${IMG_FILENAME}.img"
-INFO_FILE="${STAGE_WORK_DIR}/${IMG_FILENAME}.info"
+IMG_FILE="${STAGE_WORK_DIR}/${IMG_FILENAME}${IMG_SUFFIX}.img"
+INFO_FILE="${STAGE_WORK_DIR}/${IMG_FILENAME}${IMG_SUFFIX}.info"
on_chroot << EOF
/etc/init.d/fake-hwclock stop
@@ -74,10 +74,10 @@ unmount_image "${IMG_FILE}"
mkdir -p "${DEPLOY_DIR}"
-rm -f "${DEPLOY_DIR}/${ZIP_FILENAME}.zip"
+rm -f "${DEPLOY_DIR}/${ZIP_FILENAME}${IMG_SUFFIX}.zip"
pushd "${STAGE_WORK_DIR}" > /dev/null
-zip "${DEPLOY_DIR}/${ZIP_FILENAME}.zip" \
+zip "${DEPLOY_DIR}/${ZIP_FILENAME}${IMG_SUFFIX}.zip" \
"$(basename "${IMG_FILE}")"
popd > /dev/null
diff --git a/export-image/prerun.sh b/export-image/prerun.sh
index ca13b70..bdf034a 100755
--- a/export-image/prerun.sh
+++ b/export-image/prerun.sh
@@ -1,6 +1,6 @@
#!/bin/bash -e
-IMG_FILE="${STAGE_WORK_DIR}/${IMG_FILENAME}.img"
+IMG_FILE="${STAGE_WORK_DIR}/${IMG_FILENAME}${IMG_SUFFIX}.img"
unmount_image "${IMG_FILE}"
diff --git a/export-noobs/prerun.sh b/export-noobs/prerun.sh
index 47a4f9b..6351b2c 100755
--- a/export-noobs/prerun.sh
+++ b/export-noobs/prerun.sh
@@ -1,11 +1,11 @@
#!/bin/bash -e
-IMG_FILE="${STAGE_WORK_DIR}/${IMG_FILENAME}.img"
+IMG_FILE="${STAGE_WORK_DIR}/${IMG_FILENAME}${IMG_SUFFIX}.img"
NOOBS_DIR="${STAGE_WORK_DIR}/${IMG_DATE}-${IMG_NAME}${IMG_SUFFIX}"
unmount_image "${IMG_FILE}"
mkdir -p "${STAGE_WORK_DIR}"
-cp "${WORK_DIR}/export-image/${IMG_FILENAME}.img" "${STAGE_WORK_DIR}/"
+cp "${WORK_DIR}/export-image/${IMG_FILENAME}${IMG_SUFFIX}.img" "${STAGE_WORK_DIR}/"
rm -rf "${NOOBS_DIR}"