IMG_SUFFIX evaluation in export image (fix #241)

This commit is contained in:
Błażej Sowa 2019-01-21 19:42:54 +01:00 committed by XECDesign
parent 21aeca1b0c
commit d88f536536
5 changed files with 10 additions and 10 deletions

View file

@ -144,8 +144,8 @@ fi
export USE_QEMU="${USE_QEMU:-0}" export USE_QEMU="${USE_QEMU:-0}"
export IMG_DATE="${IMG_DATE:-"$(date +%Y-%m-%d)"}" export IMG_DATE="${IMG_DATE:-"$(date +%Y-%m-%d)"}"
export IMG_FILENAME="${IMG_FILENAME:-"${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}${IMG_SUFFIX}"}" export ZIP_FILENAME="${ZIP_FILENAME:-"image_${IMG_DATE}-${IMG_NAME}"}"
BASE_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)" BASE_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
export SCRIPT_DIR="${BASE_DIR}/scripts" export SCRIPT_DIR="${BASE_DIR}/scripts"

View file

@ -1,6 +1,6 @@
#!/bin/bash -e #!/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' ')" 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 #!/bin/bash -e
IMG_FILE="${STAGE_WORK_DIR}/${IMG_FILENAME}.img" IMG_FILE="${STAGE_WORK_DIR}/${IMG_FILENAME}${IMG_SUFFIX}.img"
INFO_FILE="${STAGE_WORK_DIR}/${IMG_FILENAME}.info" INFO_FILE="${STAGE_WORK_DIR}/${IMG_FILENAME}${IMG_SUFFIX}.info"
on_chroot << EOF on_chroot << EOF
/etc/init.d/fake-hwclock stop /etc/init.d/fake-hwclock stop
@ -74,10 +74,10 @@ unmount_image "${IMG_FILE}"
mkdir -p "${DEPLOY_DIR}" 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 pushd "${STAGE_WORK_DIR}" > /dev/null
zip "${DEPLOY_DIR}/${ZIP_FILENAME}.zip" \ zip "${DEPLOY_DIR}/${ZIP_FILENAME}${IMG_SUFFIX}.zip" \
"$(basename "${IMG_FILE}")" "$(basename "${IMG_FILE}")"
popd > /dev/null popd > /dev/null

View file

@ -1,6 +1,6 @@
#!/bin/bash -e #!/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}" unmount_image "${IMG_FILE}"

View file

@ -1,11 +1,11 @@
#!/bin/bash -e #!/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}" NOOBS_DIR="${STAGE_WORK_DIR}/${IMG_DATE}-${IMG_NAME}${IMG_SUFFIX}"
unmount_image "${IMG_FILE}" unmount_image "${IMG_FILE}"
mkdir -p "${STAGE_WORK_DIR}" 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}" rm -rf "${NOOBS_DIR}"