aboutsummaryrefslogtreecommitdiff
path: root/download
diff options
context:
space:
mode:
authorFrancis Rowe <info@gluglug.org.uk>2015-06-13 16:02:57 +0100
committerFrancis Rowe <info@gluglug.org.uk>2015-06-13 16:02:57 +0100
commit3ca13619e3b8abca9d8ed0b2ac46263e82fa2223 (patch)
tree2fc54effccd91ea1b60e9c85564f2e13b5687d02 /download
parentf2b4de9e7cd357ef87c9a2f65ecd0368f1b26e88 (diff)
downloadlibrebootfr-3ca13619e3b8abca9d8ed0b2ac46263e82fa2223.tar.gz
librebootfr-3ca13619e3b8abca9d8ed0b2ac46263e82fa2223.zip
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 ba9b7425..2c04732e 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