summaryrefslogtreecommitdiffstats
path: root/download
diff options
context:
space:
mode:
authorFrancis Rowe <info@gluglug.org.uk>2015-08-29 17:59:22 (EDT)
committer Francis Rowe <info@gluglug.org.uk>2015-08-29 17:59:22 (EDT)
commit6e5ef9793e6f80393d55101a99a5f5694c2175ae (patch)
tree379d1120ec646450950b98c464f04a193e2c8cb7 /download
parent437bc6cac4a70521969f38624878221a0be081e0 (diff)
downloadlibreboot-6e5ef9793e6f80393d55101a99a5f5694c2175ae.zip
libreboot-6e5ef9793e6f80393d55101a99a5f5694c2175ae.tar.gz
libreboot-6e5ef9793e6f80393d55101a99a5f5694c2175ae.tar.bz2
download script: fix standards compliance issues
Diffstat (limited to 'download')
-rwxr-xr-xdownload18
1 files changed, 9 insertions, 9 deletions
diff --git a/download b/download
index c53a433..004c176 100755
--- a/download
+++ b/download
@@ -48,7 +48,7 @@ if [ "${1}" = "--noconfirm" ] || [ "${1}" = "-y" ]; then
shift 1
fi
-case ${@} in
+case "${@}" in
all)
;;
list)
@@ -60,10 +60,10 @@ case ${@} in
exit
;;
*)
- for programme in ${@}; do
- echo ${programmes} | grep -wq ${programme} || (printf "ERROR: Invalid programme '${programme}'. See ./download help.\n"; exit 1)
+ for programme in "${@}"; do
+ echo "${programmes}" | grep -wq "${programme}" || (printf "ERROR: Invalid programme '%s'. See ./download help.\n" "${programme}"; exit 1)
done
- programmes=${@}
+ programmes="${*}"
;;
esac
@@ -72,16 +72,16 @@ for programme in ${programmes}; do
if [ "${noconfirm}" = "0" ]; then
printf "Use \"./download --noconfirm\" or \"./download -y\" if you want to be rid of these confirmation dialogues.\n\n"
if [ -d "${programme}/" ]; then
- printf "A ${programme}/ directory already exists, delete it? [yN]: "
- read answer
+ printf "A %s/ directory already exists, delete it? [yN]: " "${programme}"
+ read -r answer
if [ "${answer}" = "y" ]; then
- rm -Rf "${programme}/" && printf "Old ${programme} directory deleted.\n\n"
+ rm -Rf "${programme:?}" && printf "Old %s directory deleted.\n\n" "${programme}"
else
- printf "${programme} directory not deleted, and therefore not replaced.\n"
+ printf "%s directory not deleted, and therefore not replaced.\n" "${programme}"
continue
fi
fi
fi
- ${download}/${programme}
+ "${download}/${programme}"
done