Allow custom image filename

This commit is contained in:
Błażej Sowa 2018-12-17 01:02:18 +01:00 committed by Peter Johnson
parent 9436cb7f94
commit 4a0f5e87b7
4 changed files with 5 additions and 4 deletions

View File

@ -144,6 +144,7 @@ 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}"}"
BASE_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
export SCRIPT_DIR="${BASE_DIR}/scripts"

View File

@ -1,6 +1,6 @@
#!/bin/bash -e
IMG_FILE="${STAGE_WORK_DIR}/${IMG_DATE}-${IMG_NAME}${IMG_SUFFIX}.img"
IMG_FILE="${STAGE_WORK_DIR}/${IMG_FILENAME}.img"
IMGID="$(dd if="${IMG_FILE}" skip=440 bs=1 count=4 2>/dev/null | xxd -e | cut -f 2 -d' ')"

View File

@ -1,7 +1,7 @@
#!/bin/bash -e
IMG_FILE="${STAGE_WORK_DIR}/${IMG_DATE}-${IMG_NAME}${IMG_SUFFIX}.img"
INFO_FILE="${STAGE_WORK_DIR}/${IMG_DATE}-${IMG_NAME}${IMG_SUFFIX}.info"
IMG_FILE="${STAGE_WORK_DIR}/${IMG_FILENAME}.img"
INFO_FILE="${STAGE_WORK_DIR}/${IMG_FILENAME}.info"
on_chroot << EOF
/etc/init.d/fake-hwclock stop

View File

@ -1,6 +1,6 @@
#!/bin/bash -e
IMG_FILE="${STAGE_WORK_DIR}/${IMG_DATE}-${IMG_NAME}${IMG_SUFFIX}.img"
IMG_FILE="${STAGE_WORK_DIR}/${IMG_FILENAME}.img"
unmount_image "${IMG_FILE}"