From ba8d1a3782d258cbe68fc3c719a2ad7b9bbf43ba Mon Sep 17 00:00:00 2001 From: Martin Kepplinger Date: Mon, 14 Jan 2019 12:42:21 +0100 Subject: [PATCH] x230: external scripts: fix chip-not-found case This fixes a memory leak and the output in case the flash chip is not found by our scripts. --- x230/external_install_bottom.sh | 2 +- x230/external_install_top.sh | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/x230/external_install_bottom.sh b/x230/external_install_bottom.sh index fcbea5f..bd8ac36 100755 --- a/x230/external_install_bottom.sh +++ b/x230/external_install_bottom.sh @@ -163,7 +163,7 @@ if [ ! "$have_chipname" -gt 0 ] ; then fi if [ ! "$chip_found" -gt 0 ] ; then echo "chip not detected." - flashrom -p ${programmer} + flashrom -p ${programmer} || true rm -rf "${TEMP_DIR}" echo "chip not detected. Please find it manually and rerun with the -c parameter." exit 1 diff --git a/x230/external_install_top.sh b/x230/external_install_top.sh index 793b8eb..2bddd33 100755 --- a/x230/external_install_top.sh +++ b/x230/external_install_top.sh @@ -171,7 +171,7 @@ if [ ! "$have_chipname" -gt 0 ] ; then fi if [ ! "$chip_found" -gt 0 ] ; then echo "chip not detected." - flashrom -p ${programmer} + flashrom -p ${programmer} || true rm -rf "${TEMP_DIR}" echo "Please find it manually in the list above and rerun with the -c parameter." exit 1