From c581a22a5e4c6957349d32c5fba8411f4aeb6440 Mon Sep 17 00:00:00 2001 From: Martin Kepplinger Date: Tue, 17 Sep 2019 07:51:28 +0200 Subject: [PATCH] external scripts: create sha256 hash for backup images see #100 --- x230/external_install_bottom.sh | 1 + x230/external_install_top.sh | 1 + 2 files changed, 2 insertions(+) diff --git a/x230/external_install_bottom.sh b/x230/external_install_bottom.sh index c6c2b68..ec66bb1 100755 --- a/x230/external_install_bottom.sh +++ b/x230/external_install_bottom.sh @@ -212,6 +212,7 @@ flashrom -p ${programmer} -c ${CHIPNAME} -r "${TEMP_DIR}"/test2.rom cmp --silent "${TEMP_DIR}"/test1.rom "${TEMP_DIR}"/test2.rom if [ "$have_backupname" -gt 0 ] ; then cp "${TEMP_DIR}"/test1.rom "${BACKUPNAME}" + sha256sum "${TEMP_DIR}"/test1.rom > "${BACKUPNAME}".sha256 echo "current image saved as ${BACKUPNAME}" fi diff --git a/x230/external_install_top.sh b/x230/external_install_top.sh index c88cdda..b26216c 100755 --- a/x230/external_install_top.sh +++ b/x230/external_install_top.sh @@ -204,6 +204,7 @@ flashrom -p ${programmer} -c ${CHIPNAME} -r ${TEMP_DIR}/test2.rom cmp --silent "${TEMP_DIR}"/test1.rom "${TEMP_DIR}"/test2.rom if [ "$have_backupname" -gt 0 ] ; then cp "${TEMP_DIR}"/test1.rom "${BACKUPNAME}" + sha256sum "${TEMP_DIR}"/test1.rom > "${BACKUPNAME}".sha256 echo "current image saved as ${BACKUPNAME}" fi TEMP_SIZE=$(wc -c < "$TEMP_DIR/test1.rom")