Changeset 14170


Ignorieren:
Zeitstempel:
18.03.2017 20:12:00 (vor 6 Wochen)
Autor:
er13
Nachricht:

freetz_download:

  • fix "download succeeded/failed"-messages contain just the directory part of the download-URL, i.e. download-URL without filename
Datei:
1 bearbeitet

Legende:

Unverändert
Hinzugefügt
Entfernt
  • trunk/tools/freetz_download

    r14098 r14170  
    4848{ 
    4949    # $1 = target directory, $2 = download URL without file, $3 = (remote) file name 
     50    local fullURL="${2%/}/$3" 
     51 
    5052    echo 
    5153    [ "$DEBUG" == "1" ] && echo \ 
    52     "wget -nd -t3 --timeout=20 --no-check-certificate --passive-ftp -N -P \"${1%/}/\" \"${2%/}/$3\"" 
    53      wget -nd -t3 --timeout=20 --no-check-certificate --passive-ftp -N -P  "${1%/}/"   "${2%/}/$3" 
     54    "wget -nd -t3 --timeout=20 --no-check-certificate --passive-ftp -N -P \"${1%/}/\" \"${fullURL}\"" 
     55     wget -nd -t3 --timeout=20 --no-check-certificate --passive-ftp -N -P  "${1%/}/"   "${fullURL}" 
    5456    wget_result=$? 
    5557    if [ "$wget_result" != "0" ]; then 
    56         echo "Download failed - \"$2\"  ->  error code $wget_result" >&2 
     58        echo "Download failed - \"${fullURL}\"  ->  error code $wget_result" >&2 
    5759        rm -f $1/$3 
    5860        return $wget_result 
    5961    fi 
    60     echo "Download succeeded - \"$2\"  ->  saved to folder \"$1\"" 
     62    echo "Download succeeded - \"${fullURL}\"  ->  saved to folder \"$1\"" 
    6163} 
    6264 
Hinweis: Hilfe zur Verwendung der Changeset-Ansicht finden Sie unter TracChangeset.