summaryrefslogtreecommitdiffstats
path: root/flash
diff options
context:
space:
mode:
authorFrancis Rowe <info@gluglug.org.uk>2015-06-13 10:56:13 (EDT)
committer Francis Rowe <info@gluglug.org.uk>2015-06-13 10:56:13 (EDT)
commitf2b4de9e7cd357ef87c9a2f65ecd0368f1b26e88 (patch)
treec42afb7ea1d68ed089cbbee5002d04b611797ea9 /flash
parent8bc655f014eeb24bf52ffc83e0b8ae9d987569d5 (diff)
downloadlibreboot-f2b4de9e7cd357ef87c9a2f65ecd0368f1b26e88.zip
libreboot-f2b4de9e7cd357ef87c9a2f65ecd0368f1b26e88.tar.gz
libreboot-f2b4de9e7cd357ef87c9a2f65ecd0368f1b26e88.tar.bz2
flashing script: improve readibility
Diffstat (limited to 'flash')
-rwxr-xr-xflash13
1 files changed, 6 insertions, 7 deletions
diff --git a/flash b/flash
index eb1fc92..b1df925 100755
--- a/flash
+++ b/flash
@@ -54,25 +54,24 @@ if [ $# -lt 2 ]; then
exit 1
fi
+mode="${1}"
+rompath="${2}"
+
# User specified an invalid mode of operation
-if [ "${1}" != "update" ] && [ "${1}" != "forceupdate" ] && [ "${1}" != "i945lenovo_firstflash" ] && [ "${1}" != "i945lenovo_secondflash" ] && [ "${1}" != "i945apple_firstflash" ]; then
+if [ "${mode}" != "update" ] && [ "${mode}" != "forceupdate" ] && [ "${mode}" != "i945lenovo_firstflash" ] && [ "${mode}" != "i945lenovo_secondflash" ] && [ "${mode}" != "i945apple_firstflash" ]; then
printf "%s\n" "${usage}"
printf "Invalid mode. Modes available: %s\n" "${availablemodes}"
exit 1
else
- printf "Mode selected: %s\n" "${1}"
+ printf "Mode selected: %s\n" "${mode}"
fi
# The specified file does not exist
-if [ ! -f "${2}" ]; then
+if [ ! -f "${rompath}" ]; then
printf "File not found!\n"
exit 1
fi
-# For easy of readability
-mode=${1}
-rompath=${2}
-
flashrom="unknown"
if [ -f "build" ]; then
# git or libreboot_src