- Timestamp:
- Jun 6, 2017, 5:37:59 PM (4 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
zero-center/trunk/fuentes/install-files/usr/bin/zero-lliurex-wget
r5095 r5102 10 10 MSG_DONWLOADING=$(gettext "Downloading") 11 11 MSG_FROM=$(gettext "from") 12 MSG_AT=$(gettext "at") 13 MSG_IN=$(gettext "in") 14 MSG_EXISTS_FILE=$(gettext "exists, you have to delete it before if you want to download it again") 12 15 MSG_CHECKING=$(gettext "Cheking net parameters to download ") 13 16 MSG_KEEP_CALM=$(gettext "please keep calm......... ") … … 63 66 if [ -f "$2"/"$NAME_FILE" ] ; then 64 67 echo "$2/$NAME_FILE exists, you have to delete it before if you want to download it again" 65 zenity --error --text "$2/$NAME_FILE exists, you have to delete it before if you want to download it again" $ZEN_BUTTON_OK68 zenity --error --text "$2/$NAME_FILE $MSG_EXISTS_FILE" $ZEN_BUTTON_OK 66 69 exit 1 67 70 else … … 159 162 # Old instruction: 160 163 #( wget -O "$2"/"$3" "$1" 2>&1 | grep --line-buffered -o "[0-9]*%" | sed -u -e 's/.* \([0-9]\+%\)\ \+\([0-9.]\+.\) \(.*\)/\1\n# Downloaded \1\ from "'$NAME'" at \2\/s, ETA \3/' | zenity --progress percentage=0 --auto-close --auto-kill --width 600 --title="Zero-Downloader-Helper" > /dev/null 2>&1 )|| rc=1 161 ( wget -O "$2"/"$3" "$1" 2>&1 | sed -u 's/.*\ \([0-9]\+\)%\ \+\(.*\)$/\1\n'#$MSG_DONWLOADING' \1\% '$MSG_FROM' "'$NAME'" at \2/' | zenity --progress percentage=0 --auto-close --auto-kill --width 600 --title="Zero-Downloader-Helper" --text="$MSG_STARTING '$NAME' in'$2'........." $ZEN_BUTTON_CANCEL_OK > /dev/null 2>&1 )|| rc=1164 ( wget -O "$2"/"$3" "$1" 2>&1 | sed -u 's/.*\ \([0-9]\+\)%\ \+\(.*\)$/\1\n'#$MSG_DONWLOADING' \1\% '$MSG_FROM' "'$NAME'" '$MSG_AT' \2/' | zenity --progress percentage=0 --auto-close --auto-kill --width 600 --title="Zero-Downloader-Helper" --text="$MSG_STARTING '$NAME' $MSG_IN '$2'........." $ZEN_BUTTON_CANCEL_OK > /dev/null 2>&1 )|| rc=1 162 165 163 166 #Esta parte cancela el proceso del wget si se cancela la descarga en el zenity.
Note: See TracChangeset
for help on using the changeset viewer.