diff options
author | Waldemar Brodkorb <w.brodkorb@deubert.it> | 2016-02-26 06:44:00 +0100 |
---|---|---|
committer | Waldemar Brodkorb <w.brodkorb@deubert.it> | 2016-02-26 06:44:00 +0100 |
commit | 1e0cc0b4604e7745c30a37ad1b0a54a3816deff8 (patch) | |
tree | f52daedf72adc332e1e72cc2905ee933ef78dfe4 /scripts | |
parent | eb149041e833afa918d624d219c0e0311f590b3e (diff) |
prereq: allow verbose download messages from fetchcmd when make v is used
Diffstat (limited to 'scripts')
-rwxr-xr-x | scripts/prereq.sh | 17 |
1 files changed, 15 insertions, 2 deletions
diff --git a/scripts/prereq.sh b/scripts/prereq.sh index 97a0bc136..10ab9b382 100755 --- a/scripts/prereq.sh +++ b/scripts/prereq.sh @@ -12,6 +12,7 @@ out=0 mirror=http://distfiles.openadk.org makever=4.1 bashver=4.3.30 +dlverbose=0 # detect operating system os=$(env uname) @@ -41,6 +42,10 @@ if [ -e foo ]; then fi rm -f FOO +if [ "$target" = "v" ]; then + dlverbose=1 +fi + # do we have a download tool? tools="curl wget" for tool in $tools; do @@ -49,10 +54,18 @@ for tool in $tools; do printf "found\n" case $tool in curl) - FETCHCMD="$(which $tool) -L -k -f -s -o " + if [ $dlverbose -eq 1 ]; then + FETCHCMD="$(which $tool) -L -k -f -\# -o " + else + FETCHCMD="$(which $tool) -L -k -f -s -o " + fi ;; wget) - FETCHCMD="$(which $tool) --no-check-certificate -q -O " + if [ $dlverbose -eq 1 ]; then + FETCHCMD="$(which $tool) --no-check-certificate -O " + else + FETCHCMD="$(which $tool) --no-check-certificate -q -O " + fi ;; esac break |