summaryrefslogtreecommitdiffstats
path: root/download
diff options
context:
space:
mode:
authorFrancis Rowe <info@gluglug.org.uk>2015-06-13 11:02:57 (EDT)
committer Francis Rowe <info@gluglug.org.uk>2015-06-13 11:02:57 (EDT)
commit3ca13619e3b8abca9d8ed0b2ac46263e82fa2223 (patch)
tree2fc54effccd91ea1b60e9c85564f2e13b5687d02 /download
parentf2b4de9e7cd357ef87c9a2f65ecd0368f1b26e88 (diff)
downloadlibreboot-3ca13619e3b8abca9d8ed0b2ac46263e82fa2223.zip
libreboot-3ca13619e3b8abca9d8ed0b2ac46263e82fa2223.tar.gz
libreboot-3ca13619e3b8abca9d8ed0b2ac46263e82fa2223.tar.bz2
download script: use a standard style (compared to other scripts)
Diffstat (limited to 'download')
-rwxr-xr-xdownload22
1 files changed, 11 insertions, 11 deletions
diff --git a/download b/download
index ba9b742..2c04732 100755
--- a/download
+++ b/download
@@ -22,30 +22,30 @@
[ "x${DEBUG+set}" = 'xset' ] && set -v
set -u -e
-download=./resources/scripts/helpers/download
+download="./resources/scripts/helpers/download"
programme="unknown"
usage="./download programme"
-availableprogrammes="$(ls $download/)"
+availableprogrammes="$(ls ${download}/)"
# User specified no or too few/many parameters
if (( $# != 1 )); then
- printf "$usage\n\n"
- printf "possible values for 'programme':\nall:\n$availableprogrammes\n\n"
+ printf "%s\n\n" "${usage}"
+ printf "possible values for 'programme':\nall:\n%s\n\n" "${availableprogrammes}"
printf "Example (download everything): ./download all\n"
printf "Example (download coreboot): ./download coreboot\n\n"
exit 1
fi
-programme=$1
+programme="${1}"
-if [ "$programme" = "all" ]; then
- for programme in $availableprogrammes; do
- $download/$programme
+if [ "${programme}" = "all" ]; then
+ for programme in ${availableprogrammes}; do
+ ${download}/${programme}
done
-elif [ -f "$download/$programme" ]; then
- $download/$programme
+elif [ -f "${download}/${programme}" ]; then
+ ${download}/${programme}
else
- printf "Invalid programme. Available programmes are:\nall\n$availableprogrammes\n"
+ printf "Invalid programme. Available programmes are:\nall\n%s\n" "${availableprogrammes}"
exit 1
fi