forked from CastroFidel/PortWINE
###Scripts version 2021###
This commit is contained in:
@ -91,14 +91,14 @@ try_force_link_dir () {
|
||||
|
||||
try_download () {
|
||||
set -o pipefail
|
||||
wget -c -t 5 -T 2 "$1" --output-document="$2" 2>&1 | \
|
||||
wget -c -t 5 -T 3 "$1" --output-document="$2" 2>&1 | \
|
||||
tr '\r' '\n' | sed -u 's/.* \([0-9]\+%\)\ \+\([0-9,.]\+.\) \(.*\)/\1\n#Downloading at \1\/, \2\/s, ETA \3/; s/^20[0-9][0-9].*/#Done./' | \
|
||||
zenity --progress --percentage=0 --title="Download $(basename $1)" --text=Starting... --auto-close --auto-kill --width=500 --height=90
|
||||
[ "${PIPESTATUS[0]}" != 0 ] && print_error "failed to download $1. Scipping." && return 1 || return 0
|
||||
}
|
||||
|
||||
try_download_silent () {
|
||||
wget -c -t 1 -T 20 "$1" --output-document="$2"
|
||||
wget -t 2 -T 10 "$1" --output-document="$2"
|
||||
[ "$?" != 0 ] && print_error "failed to download $1. Scipping." && return 1 || return 0
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user