diff options
author | Sven Gothel <[email protected]> | 2021-07-04 13:29:32 +0200 |
---|---|---|
committer | Sven Gothel <[email protected]> | 2021-07-04 13:29:32 +0200 |
commit | 9e856799d83cc5dfb84a92601b131420c0170877 (patch) | |
tree | e73003aad427fe025f6901bc5d95fd755196be9e | |
parent | ec5305aa4b1c9685e67c9a08fa33a3e5b63bb549 (diff) |
export-image (ro): Create zip storage only archive of sdcard and SHA256SUMS over all files
zip name: ${IMG_FILENAME}${IMG_SUFFIX}.sdcard.zip
-rwxr-xr-x | export-image/04-finalise/01-run.sh | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/export-image/04-finalise/01-run.sh b/export-image/04-finalise/01-run.sh index 8d64997..e05bfbd 100755 --- a/export-image/04-finalise/01-run.sh +++ b/export-image/04-finalise/01-run.sh @@ -130,8 +130,15 @@ if [ "${ROOTFS_RO}" = "1" ] ; then # cp -a "$IMG_FILE_ROOT_EXT4" "${DEPLOY_DIR2}/sdcard${IMG_SUFFIX}/sys_arm64_000/rootfs.img" cp -a "$IMG_FILE_ROOT_SQFS_LZO" "${DEPLOY_DIR2}/sdcard${IMG_SUFFIX}/sys_arm64_000/rootfs.img" + ( cd "${DEPLOY_DIR2}/sdcard${IMG_SUFFIX}"; zip -r0 "../${IMG_FILENAME}${IMG_SUFFIX}.sdcard.zip" . ) + mv "$IMG_FILE_ROOT_EXT4" "$DEPLOY_DIR2/" mv "$IMG_FILE_ROOT_SQFS_GZ" "$DEPLOY_DIR2/" mv "$IMG_FILE_ROOT_SQFS_LZO" "$DEPLOY_DIR2/" mv "$IMG_FILE_ROOT_SQFS_NONE" "$DEPLOY_DIR2/" fi + +rm -f "${STAGE_WORK_DIR}/SHA256SUMS" +( cd "${DEPLOY_DIR2}"; find . -maxdepth 1 -type f -exec sha256sum -b \{\} >> "${STAGE_WORK_DIR}/SHA256SUMS" \; ) +mv "${STAGE_WORK_DIR}/SHA256SUMS" "$DEPLOY_DIR2/" + |