diff options
author | Stefan Agner <stefan.agner@toradex.com> | 2016-04-19 16:24:13 -0700 |
---|---|---|
committer | Marcel Ziswiler <marcel.ziswiler@toradex.com> | 2016-06-24 00:51:05 +0200 |
commit | c62ed6f52b3ac99b3d9f74047e60ea57870c378d (patch) | |
tree | 55c2a22db0d9f36ccf92a5cb1f6b317d92d283d1 | |
parent | cdf4bd4e2baca1f4c3f46b98306b9d2903d14e21 (diff) |
update.sh: do not error out during mkfs.ubifs/cbootimage tests
If executing the command fails, the exit code will be <> 1 which
leads to an imeadiate exit (due to set -e). Avoid exiting by
adding "|| true" to the sanity check commands.
Signed-off-by: Stefan Agner <stefan.agner@toradex.com>
Acked-by: Marcel Ziswiler <marcel.ziswiler@toradex.com>
-rwxr-xr-x | recipes/images/files/colibri-imx7/update.sh | 2 | ||||
-rwxr-xr-x | recipes/images/files/colibri-vf/update.sh | 2 | ||||
-rwxr-xr-x | recipes/images/files/library/tegra/update.sh | 4 |
3 files changed, 4 insertions, 4 deletions
diff --git a/recipes/images/files/colibri-imx7/update.sh b/recipes/images/files/colibri-imx7/update.sh index e6f041c..ee44989 100755 --- a/recipes/images/files/colibri-imx7/update.sh +++ b/recipes/images/files/colibri-imx7/update.sh @@ -131,7 +131,7 @@ then fi #sanity check, can we execute mkfs.ubifs, e.g. see the help text? -CNT=`sudo $LOCPATH/mkfs.ubifs -h | grep -c space-fixup` +CNT=`sudo $LOCPATH/mkfs.ubifs -h | grep -c space-fixup || true` if [ "$CNT" -eq 0 ] ; then echo "The program mkfs.ubifs can not be executed or does not provide --space-fixup" echo "option." diff --git a/recipes/images/files/colibri-vf/update.sh b/recipes/images/files/colibri-vf/update.sh index 38f89d7..05af9ca 100755 --- a/recipes/images/files/colibri-vf/update.sh +++ b/recipes/images/files/colibri-vf/update.sh @@ -148,7 +148,7 @@ then fi #sanity check, can we execute mkfs.ubifs, e.g. see the help text? -CNT=`sudo $LOCPATH/mkfs.ubifs -h | grep -c space-fixup` +CNT=`sudo $LOCPATH/mkfs.ubifs -h | grep -c space-fixup || true` if [ "$CNT" -eq 0 ] ; then echo "The program mkfs.ubifs can not be executed or does not provide --space-fixup" echo "option." diff --git a/recipes/images/files/library/tegra/update.sh b/recipes/images/files/library/tegra/update.sh index 3d3a7db..8f09001 100755 --- a/recipes/images/files/library/tegra/update.sh +++ b/recipes/images/files/library/tegra/update.sh @@ -239,12 +239,12 @@ MKFSVFAT=`command -v mkfs.vfat` || MKFSVFAT=`sudo -s command -v mkfs.vfat` || { MKFSEXT3=`command -v mkfs.ext3` || MKFSEXT3=`sudo -s command -v mkfs.ext3` || { echo >&2 "Program mkfs.ext3 not available. Aborting."; exit 1; } dd --help >/dev/null 2>&1 || { echo >&2 "Program dd not available. Aborting."; exit 1; } -CBOOT_CNT=`tegra-uboot-flasher/cbootimage -h | grep -c outputimage` +CBOOT_CNT=`tegra-uboot-flasher/cbootimage -h | grep -c outputimage || true` [ "$CBOOT_CNT" -gt 0 ] || { echo >&2 "Program cbootimage not available. 32bit compatibility libs? Aborting."; exit 1; } if [ "${MODTYPE}" = "colibri-t20" ] ; then #sanity check, can we execute mkfs.ubifs, e.g. see the help text? - CNT=`sudo $LOCPATH/mkfs.ubifs -h | grep -c space-fixup` + CNT=`sudo $LOCPATH/mkfs.ubifs -h | grep -c space-fixup || true` if [ "$CNT" -eq 0 ] ; then echo "The program mkfs.ubifs can not be executed or does not provide --space-fixup" echo "option." |