Browse Source

external scripts: create sha256 hash for backup images

see #100
pull/107/head
Martin Kepplinger 5 years ago
parent
commit
c581a22a5e
2 changed files with 2 additions and 0 deletions
  1. +1
    -0
      x230/external_install_bottom.sh
  2. +1
    -0
      x230/external_install_top.sh

+ 1
- 0
x230/external_install_bottom.sh View File

@ -212,6 +212,7 @@ flashrom -p ${programmer} -c ${CHIPNAME} -r "${TEMP_DIR}"/test2.rom
cmp --silent "${TEMP_DIR}"/test1.rom "${TEMP_DIR}"/test2.rom cmp --silent "${TEMP_DIR}"/test1.rom "${TEMP_DIR}"/test2.rom
if [ "$have_backupname" -gt 0 ] ; then if [ "$have_backupname" -gt 0 ] ; then
cp "${TEMP_DIR}"/test1.rom "${BACKUPNAME}" cp "${TEMP_DIR}"/test1.rom "${BACKUPNAME}"
sha256sum "${TEMP_DIR}"/test1.rom > "${BACKUPNAME}".sha256
echo "current image saved as ${BACKUPNAME}" echo "current image saved as ${BACKUPNAME}"
fi fi


+ 1
- 0
x230/external_install_top.sh View File

@ -204,6 +204,7 @@ flashrom -p ${programmer} -c ${CHIPNAME} -r ${TEMP_DIR}/test2.rom
cmp --silent "${TEMP_DIR}"/test1.rom "${TEMP_DIR}"/test2.rom cmp --silent "${TEMP_DIR}"/test1.rom "${TEMP_DIR}"/test2.rom
if [ "$have_backupname" -gt 0 ] ; then if [ "$have_backupname" -gt 0 ] ; then
cp "${TEMP_DIR}"/test1.rom "${BACKUPNAME}" cp "${TEMP_DIR}"/test1.rom "${BACKUPNAME}"
sha256sum "${TEMP_DIR}"/test1.rom > "${BACKUPNAME}".sha256
echo "current image saved as ${BACKUPNAME}" echo "current image saved as ${BACKUPNAME}"
fi fi
TEMP_SIZE=$(wc -c < "$TEMP_DIR/test1.rom") TEMP_SIZE=$(wc -c < "$TEMP_DIR/test1.rom")


Loading…
Cancel
Save