From 1e0cc0b4604e7745c30a37ad1b0a54a3816deff8 Mon Sep 17 00:00:00 2001 From: Waldemar Brodkorb Date: Fri, 26 Feb 2016 06:44:00 +0100 Subject: prereq: allow verbose download messages from fetchcmd when make v is used --- scripts/prereq.sh | 17 +++++++++++++++-- 1 file 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 -- cgit v1.2.3