diff options
author | Francis Rowe <info@gluglug.org.uk> | 2015-08-29 16:57:04 (EDT) |
---|---|---|
committer | Francis Rowe <info@gluglug.org.uk> | 2015-08-29 16:57:04 (EDT) |
commit | 5609232858950a676434adc7a96a722ae27dba76 (patch) | |
tree | 5e8242e59478e85273edc79a86264eaf614716e3 /download | |
parent | 434f8e0b03e4b693e065c0afdb4505c529d40e53 (diff) | |
download | libreboot-5609232858950a676434adc7a96a722ae27dba76.zip libreboot-5609232858950a676434adc7a96a722ae27dba76.tar.gz libreboot-5609232858950a676434adc7a96a722ae27dba76.tar.bz2 |
download script: ask before replacing an already downloaded module
Diffstat (limited to 'download')
-rwxr-xr-x | download | 12 |
1 files changed, 12 insertions, 0 deletions
@@ -52,5 +52,17 @@ case ${@} in esac for programme in ${programmes}; do + + if [ -d "${programme}/" ]; then + printf "A ${programme}/ directory already exists, delete it? [yN]: " + read answer + if [ "${answer}" = "y" ]; then + rm -Rf "${programme}/" && printf "Old ${programme} directory deleted.\n\n" + else + printf "${programme} directory not deleted, and therefore not replaced.\n" + continue + fi + fi + ${download}/${programme} done |