diff options
author | Francis Rowe <info@gluglug.org.uk> | 2014-11-21 04:23:00 +0000 |
---|---|---|
committer | Francis Rowe <info@gluglug.org.uk> | 2014-11-21 04:23:00 +0000 |
commit | 862987344403417057deb453dd73887799cb0fcb (patch) | |
tree | 03fbf880815c073e9fd7a478508c2340742f406a | |
parent | a87f27c40d01f14f139c5bb89df14da8681f4b61 (diff) | |
download | librebootfr-862987344403417057deb453dd73887799cb0fcb.tar.gz librebootfr-862987344403417057deb453dd73887799cb0fcb.zip |
scripts (error handling): Replace exit with exit 1
This is so that scripts using these in the future can
more easily debug if errors occur.
-rwxr-xr-x | addseabios | 4 | ||||
-rwxr-xr-x | builddeps-cbfstool | 2 | ||||
-rwxr-xr-x | buildrom-withgrub | 2 | ||||
-rwxr-xr-x | flash | 4 | ||||
-rwxr-xr-x | lenovobios_firstflash | 6 | ||||
-rwxr-xr-x | lenovobios_secondflash | 4 | ||||
-rwxr-xr-x | macbook21_firstflash | 4 |
7 files changed, 13 insertions, 13 deletions
@@ -27,12 +27,12 @@ echo "Adding SeaBIOS and SeaVGABIOS to the ROM's" # This is how we know. if [ -f "DEBLOB" ]; then echo "Do not run this in meta/src directory. Do it in binary archive, either with libreboot-supplied ROM images or your own binary archive created with 'build-release'." - exit + exit 1 fi if [ ! -f "cbfstool" ]; then echo "cbfstool not found. Please run ./builddeps-cbfstool first. Check the docs for how to get build dependencies." - exit + exit 1 fi # Add SeaBIOS and SeaVGABIOS to *all* ROM's diff --git a/builddeps-cbfstool b/builddeps-cbfstool index ee1240ea..57d903f3 100755 --- a/builddeps-cbfstool +++ b/builddeps-cbfstool @@ -27,7 +27,7 @@ set -u -e -v # This is how we know. if [ -f "DEBLOB" ]; then echo "Do not run this in meta/src directory. Do it in binary archive, either with libreboot-supplied ROM images or your own binary archive created with 'build-release'." - exit + exit 1 fi cd cbfstool_standalone diff --git a/buildrom-withgrub b/buildrom-withgrub index 489fac6b..b86bbe98 100755 --- a/buildrom-withgrub +++ b/buildrom-withgrub @@ -28,7 +28,7 @@ if (( $# != 1 )); then echo "Usage: ./buildrom-withgrub boardname" echo "Example: ./buildrom-withgrub x60" echo "You need to specify exactly 1 argument" - exit + exit 1 fi cd coreboot @@ -29,11 +29,11 @@ if (( $# != 1 )); then echo "Usage: ./lenovobios_firstflash yourrom.rom" echo "usage: ./lenovobios_firstflash path/to/yourrom.rom" echo "You need to specify exactly 1 file" - exit + exit 1 fi if [ ! -f $1 ]; then echo "File not found!" - exit + exit 1 fi # boardmismatch=force is for people upgrading from libreboot 5th release, where the new ROM's are "ThinkPad X60 / X60s / X60t" diff --git a/lenovobios_firstflash b/lenovobios_firstflash index 4db50b77..4b25c134 100755 --- a/lenovobios_firstflash +++ b/lenovobios_firstflash @@ -31,11 +31,11 @@ if (( $# != 1 )); then echo "Usage: ./lenovobios_firstflash yourrom.rom" echo "usage: ./lenovobios_firstflash path/to/yourrom.rom" echo "You need to specify exactly 1 file" - exit + exit 1 fi if [ ! -f $1 ]; then echo "File not found!" - exit + exit 1 fi # needed for first flashing, otherwise machine will be bricked @@ -44,7 +44,7 @@ fi } || { # catch echo "BUCTS issue (most likely not compiled). Make sure BUC.TS is 1, or else you will brick your machine." echo "ABORTING so as to protect against bricking the machine." - exit + exit 1 } # run both. one will fail (and be harmless), the other will succeed. diff --git a/lenovobios_secondflash b/lenovobios_secondflash index 386f2c3e..c0a1cc81 100755 --- a/lenovobios_secondflash +++ b/lenovobios_secondflash @@ -31,11 +31,11 @@ if (( $# != 1 )); then echo "Usage: ./lenovobios_firstflash yourrom.rom" echo "usage: ./lenovobios_firstflash path/to/yourrom.rom" echo "You need to specify exactly 1 file" - exit + exit 1 fi if [ ! -f $1 ]; then echo "File not found!" - exit + exit 1 fi # Flash it a 2nd time, to write upper 64K block diff --git a/macbook21_firstflash b/macbook21_firstflash index dbbe534c..c414f260 100755 --- a/macbook21_firstflash +++ b/macbook21_firstflash @@ -29,11 +29,11 @@ if (( $# != 1 )); then echo "Usage: ./lenovobios_firstflash yourrom.rom" echo "usage: ./lenovobios_firstflash path/to/yourrom.rom" echo "You need to specify exactly 1 file" - exit + exit 1 fi if [ ! -f $1 ]; then echo "File not found!" - exit + exit 1 fi # flashrom doesn't recognize the machine unless you use that switch: laptop=force_I_want_a_brick |