Browse Source

prereq: allow verbose download messages from fetchcmd when make v is used

Waldemar Brodkorb 8 years ago
parent
commit
1e0cc0b460
1 changed files with 15 additions and 2 deletions
  1. 15 2
      scripts/prereq.sh

+ 15 - 2
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