diff options
Diffstat (limited to 'download')
-rwxr-xr-x | download | 28 |
1 files changed, 14 insertions, 14 deletions
@@ -1,6 +1,6 @@ #!/bin/bash -# download script: Download the programmes used in libreboot, that +# download script: Download the programs used in libreboot, that # aren't distributed in the git repository. # # Copyright (C) 2014, 2015 Francis Rowe <info@gluglug.org.uk> @@ -24,12 +24,12 @@ set -u -e download="resources/scripts/helpers/download" -programmes="$(ls ${download}/)" +programs="$(ls ${download}/)" noconfirm="0" help () { - printf "%s\n\n" "./download programme(s) # programmes are space separated, if specifing multiple programmes" - printf "possible values for 'programmes':\nall:\n%s\n\n" "${programmes}" + printf "%s\n\n" "./download program(s) # programs are space separated, if specifing multiple programs" + printf "possible values for 'programs':\nall:\n%s\n\n" "${programs}" printf "Example (download everything): ./download all\n" printf "Example (download flashrom): ./download flashrom\n" printf "Example (download coreboot): ./download coreboot\n" @@ -52,7 +52,7 @@ case "${1}" in all) ;; list) - printf "possible values for 'programmes':\nall\n%s\n\n" "${programmes}" + printf "possible values for 'programs':\nall\n%s\n\n" "${programs}" exit ;; help) @@ -60,28 +60,28 @@ case "${1}" in exit ;; *) - for programme in "${@}"; do - printf "%s" "${programmes}\n" | grep -wq "${programme}" || (printf "ERROR: Invalid programme '%s'. See ./download help.\n" "${programme}"; exit 1) + for program in "${@}"; do + printf "%s" "${programs}\n" | grep -wq "${program}" || (printf "ERROR: Invalid program '%s'. See ./download help.\n" "${program}"; exit 1) done - programmes="${*}" + programs="${*}" ;; esac -for programme in ${programmes}; do +for program in ${programs}; 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 %s/ directory already exists, delete it? [yN]: " "${programme}" + if [ -d "${program}/" ]; then + printf "A %s/ directory already exists, delete it? [yN]: " "${program}" read -r answer if [ "${answer}" = "y" ]; then - rm -Rf "${programme:?}" && printf "Old %s directory deleted.\n\n" "${programme}" + rm -Rf "${program:?}" && printf "Old %s directory deleted.\n\n" "${program}" else - printf "%s directory not deleted, and therefore not replaced.\n" "${programme}" + printf "%s directory not deleted, and therefore not replaced.\n" "${program}" continue fi fi fi - "${download}/${programme}" + "${download}/${program}" done |