aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-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