Changeset 1874 for zero-lliurex-dni


Ignore:
Timestamp:
Jun 8, 2016, 1:42:10 PM (3 years ago)
Author:
daduve
Message:

New script

File:
1 edited

Legend:

Unmodified
Added
Removed
  • zero-lliurex-dni/trunk/fuentes/zero-lliurex-dni.zlaunchers/zero-lliurex-accv.zmd

    r1867 r1874  
    2323
    2424# MSGS
     25MSG_CANCEL_LABEL="$(gettext 'Cancel')"
     26MSG_OK_LABEL="$(gettext 'Install')"
     27MSG_TITLE="$(gettext 'ACCV CARD READER CONFIGURATOR')"
    2528MSG_LIBRARY_NOT_FOUND="$(gettext 'Library not found:')"
     29MSG_ERROR_LINK="$(gettext 'is not in your system, impossible to create link.')"
     30MSG_ERROR_REPOS="$(gettext 'is impossible to install , perhaps you have some problems with repositories.')"
     31MSG_DRIVER_INFO="$(gettext 'With this assitent you are going to install card drivers from ACCV to use in Firefox and Thunderbird.')"
     32MSG_OK_DRIVER="$(gettext 'Card readers accepted:')"
     33MSG_FAILED_DRIVER="$(gettext 'Unstable card readers:')"
    2634MSG_SOME_PROBLEM_FIREFOX="$(gettext 'Some problem with firefox profile')"
    2735MSG_ONCE_FIREFOX="$(gettext 'Start firefox once at least')"
     
    7280        if [ $is_running -gt 0 ]; then
    7381                while [ $is_running -gt 0 ] ; do
    74                         zenity --info --text="$MSG_RUNNING_THUNDER"
     82                        zenity --info --title="$MSG_TITLE" --text="$MSG_RUNNING_THUNDER"
    7583                        is_running=$(ps -fe | grep thunderbird | grep -v grep | wc -l)
    7684                done
     
    170178        get_firefox_default_profile
    171179        if [ ! -d $FF_PROFILE_PATH ]; then
    172                 zenity --info --text="$MSG_SOME_PROBLEM_FIREFOX"
     180                zenity --info --title="$MSG_TITLE" --text="$MSG_SOME_PROBLEM_FIREFOX"
    173181                return 1
    174182        fi
     
    177185        return 0
    178186   else
    179       zenity --info --text="$MSG_CREATING_FIREFOX"
     187      zenity --info --title="$MSG_TITLE" --text="$MSG_CREATING_FIREFOX"
    180188      echo "$MSG_CREATING_FIREFOX" >> $ACCV_LOG
    181189        su $USER -c "firefox"
     
    192200        get_thunderbird_default_profile
    193201        if [ ! -d $TH_PROFILE_PATH ]; then
    194                 zenity --info --text="$MSG_SOME_PROBLEM_THUNDER"
     202                zenity --info --title="$MSG_TITLE" --text="$MSG_SOME_PROBLEM_THUNDER"
    195203                return 1
    196204        fi
     
    199207        return 0
    200208   else
    201         zenity --info --text="$MSG_CREATING_THUNDER"
     209        zenity --info --title="$MSG_TITLE" --text="$MSG_CREATING_THUNDER"
    202210        echo "$MSG_CREATING_THUNDER" >> $ACCV_LOG
    203211        su $USER -c "thunderbird"
     
    251259        test_running_firefox
    252260        if [ $? -gt 0 ]; then
    253                 zenity --info --text="$MSG_RUNNING_FIREFOX"
     261                zenity --info --title="$MSG_TITLE" --text="$MSG_RUNNING_FIREFOX"
    254262                ERROR=1
    255263                echo "$ERROR do_firefox" > $ACCV_ERROR
     
    264272        fi
    265273   else
    266       zenity --info --text="$MSG_NOT_FIREFOX"
     274      zenity --info --title="$MSG_TITLE" --text="$MSG_NOT_FIREFOX"
    267275      ERROR=1
    268276        echo "$ERROR do_firefox_else" > $ACCV_ERROR
     
    279287        test_running_thunderbird
    280288        if [ $? -gt 0 ]; then
    281                 zenity --info --text="$MSG_RUNNING_THUNDER"
     289                zenity --info --title="$MSG_TITLE" --text="$MSG_RUNNING_THUNDER"
    282290                 ERROR=1
    283291                echo "$ERROR do_thunderbird" > $ACCV_ERROR
     
    292300        fi
    293301   else
    294       zenity --info --text="$MSG_NOT_THUNDER"
     302      zenity --info --title="$MSG_TITLE" --text="$MSG_NOT_THUNDER"
    295303      ERROR=1
    296304      echo "$ERROR do_thunderbird_else" > $ACCV_ERROR
     
    333341                        echo "">> $ACCV_LOG
    334342                        echo "Abort installation">> $ACCV_LOG
    335                         zenity --error --text="Impossible to create ln with $ROUTE_LIBRARY/$LIBRARY because is not in your system. $MSG_FINAL_ACCV_ERROR"
     343                        zenity --error --title="$MSG_TITLE" --text="$ROUTE_LIBRARY/$LIBRARY $MSG_ERROR_LINK $MSG_FINAL_ACCV_ERROR"
    336344                        exit 1
    337345                fi
     
    360368                        echo "">> $ACCV_LOG
    361369                        echo "Abort installation">> $ACCV_LOG
    362                         zenity --error --text="Impossible to create ln with $ROUTE_LIBRARY/$LIBRARY because is not in your system. $MSG_FINAL_ACCV_ERROR"
     370                        zenity --error --title="$MSG_TITLE" --text="$ROUTE_LIBRARY/$LIBRARY $MSG_ERROR_LINK $MSG_FINAL_ACCV_ERROR"
    363371                        exit 1
    364372                fi
     
    375383check_install(){
    376384        if [ $1 != 0 ] ; then
    377                 zenity --error --text="Impossible to install $2, problems with repos. $MSG_FINAL_ACCV_ERROR"
     385                zenity --error --title="$MSG_TITLE" --text="$2 $MSG_ERROR_REPOS $MSG_FINAL_ACCV_ERROR"
    378386                ERROR=1
    379387                echo "$ERROR check_install" > $ACCV_ERROR
     
    394402echo "$ERROR inicializacion" > $ACCV_ERROR
    395403
    396 zenity --info --text '<span foreground="blue" font="15">Funcionamiento correcto\ncon los lectores:</span>\n\n<i>- Identive SCR3310v2</i>\n<i>- Identive Cloud 2700R</i>\n<i>- Omnikey Cardman 3021 y 3121</i>\n\n<span foreground="blue" font="15">Funcionamiento inestable con:</span>\n\n<i>- Teclado Cherry G83-6644</i>'
     404zenity --question --title="$MSG_TITLE" --text "<span foreground='blue' font='12'>$MSG_DRIVER_INFO</span>\n\n<span foreground='red' font='10'>$MSG_OK_DRIVER</span>\n\n<i>- Identive SCR3310v2</i>\n<i>- Identive Cloud 2700R</i>\n<i>- Omnikey Cardman 3021 y 3121</i>\n\n<span foreground='red' font='10'>Unstable card readers:</span>\n\n<i>- Teclado Cherry G83-6644</i>" --ok-label="$MSG_OK_LABEL" --cancel-label="$MSG_CANCEL_LABEL"
     405[ $? == '0' ] || exit 1
    397406USER_HOME=$(pwd)
    398407USER=$(who | awk '{print $1;}')
     
    459468echo "60"
    460469if [ $(rgrep 1 $ACCV_ERROR) ] ; then 
    461         zenity --error --text="$MSG_FINAL_ERROR" 
     470        zenity --error --title="$MSG_TITLE" --text="$MSG_FINAL_ERROR" 
    462471        exit 1
    463472fi
     
    469478) |
    470479zenity --progress \
    471  --title="ZERO-LLIUREX-ACCV" \
     480 --title="$MSG_TITLE" \
    472481  --text="$MSG_INSTALLING_ACCV_PROGRESS" \
    473482  --percentage=0 \
     
    480489
    481490if [ $(rgrep 1 $ACCV_ERROR) ] ; then 
    482         zenity --error --text="$MSG_FINAL_ERROR"
     491        zenity --error --title="$MSG_TITLE" --text="$MSG_FINAL_ERROR"
    483492        echo "" >> $ACCV_LOG
    484493        echo "$MSG_FINAL_ERROR" >> $ACCV_LOG
    485494        exit 1
    486495  else
    487         zenity --info --text="$MSG_FINAL_ACCV_OK"
     496        zenity --info --title="$MSG_TITLE" --text="$MSG_FINAL_ACCV_OK"
    488497        echo "" >> $ACCV_LOG
    489498        echo "$MSG_FINAL_ACCV_OK" >> $ACCV_LOG
Note: See TracChangeset for help on using the changeset viewer.