Ignore:
Timestamp:
Jun 6, 2017, 5:37:59 PM (3 years ago)
Author:
jrpelegrina
Message:

Updated changelog. Fix some bugs in helpers

File:
1 edited

Legend:

Unmodified
Added
Removed
  • zero-center/trunk/fuentes/install-files/usr/bin/zero-lliurex-axel

    r5095 r5102  
    99MSG_BUTTON_CANCEL=$(gettext "Cancel")
    1010MSG_DONWLOADING=$(gettext "Downloading")
     11MSG_FROM=$(gettext "from")
     12MSG_AT=$(gettext "at")
     13MSG_IN=$(gettext "in")
     14MSG_EXISTS_FILE=$(gettext "exists, you have to delete it before if you want to download it again")
    1115
    1216
     
    4751                        if [ -f "$2"/"$NAME_FILE" ] ; then
    4852                                echo "$2/$NAME_FILE exists, you have to delete it before if you want to download it again"
    49                                 zenity --error --text "$2/$NAME_FILE exists, you have to delete it before if you want to download it again" $ZEN_BUTTON_OK
     53                                #zenity --error --text "$2/$NAME_FILE exists, you have to delete it before if you want to download it again" $ZEN_BUTTON_OK
     54                                zenity --error --text "$2/$NAME_FILE $MSG_EXISTS_FILE" $ZEN_BUTTON_OK
    5055
    5156                                exit 1
     
    109114                                PERCENT=$( tail -1 /tmp/axel.log  2>/dev/null  | grep % | sed 's/[^0-9.]*\([0-9.]*\).*/\1/' )
    110115                                #Hacemos echo de los datos que necesita el zenity
    111                                 echo "#MSG_DONWLOADING $3 in $2 ...................$PERCENT%"
     116                                #echo "Downloading $3 in $2 ...................$PERCENT%"
     117                                echo "#$MSG_DONWLOADING $3 $MSG_IN $2 ...................$PERCENT%"
     118
    112119                                echo "$PERCENT"
    113120                                #por ultimo entubamos la salida al zenity progress para que nos muestre el resultado en pantalla
     
    164171                # Old instruction:
    165172                #( 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
    166                 ( wget -O "$2"/"$3" "$1" 2>&1 |  sed -u 's/.*\ \([0-9]\+\)%\ \+\(.*\)$/\1\n'#$MSG_DONWLOADING' \1\% from "'$NAME'" at \2/' | zenity  --progress percentage=0 --auto-close --auto-kill --width 600 --title="Zero-Downloader-Helper" --text="$MSG_STARTING '$NAME'........." > /dev/null 2>&1  )|| rc=1
     173                ( 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'........." > /dev/null 2>&1  )|| rc=1
    167174
    168175                #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.