Ignore:
Timestamp:
Sep 6, 2017, 12:24:23 PM (3 years ago)
Author:
jrpelegrina
Message:

WIP in changes

File:
1 edited

Legend:

Unmodified
Added
Removed
  • zero-lliurex-gearth/trunk/fuentes/zero-lliurex-gearth.i386.zmd

    r5754 r5756  
    1515MSG_INSTALL_ERROR=$(gettext "is not installed in your system, please retry again and test if you have acess to repositories in net, or contact with Lliurex Team at http://mestreacasa.gva.es/web/lliurex/forums")
    1616MSG_CANCELLED=$(gettext "Your dowloading has been cancel. Google Earth will not be installed in your system ")
     17MSG_REMOVE_OLD=$(gettext "Previous version of Google Earth will be uninstalled")
    1718
    1819
     
    2425PACKAGE_NAME="google-earth-pro-stable"
    2526GEARTH_REPO_FILE="/etc/apt/sources.list.d/google-earth.list"
     27OLD_PACKAGE_NAME="google-earth-stable"
     28
    2629
    2730
     
    7174if zenity --question --text="$MSG_COPIAR" > /dev/null 2>&1; then
    7275        RUTA=$(zenity --file-selection --directory  --text="$MSG_GUARDAR" )
    73         cp $temp $RUTA
     76        if [ ! -z $RUTA ];then
     77                cp $temp $RUTA
     78        fi     
     79       
    7480fi
    7581# PREGUNTAR SI LO QUIERE INSTALAR
     
    8591#LIMPIA Y DA ESPLENDOR
    8692rm -f $temp
    87 desktop_path="/usr/share/mate/applications/google-earth.desktop"
    88 
     93old_desktop_path="/usr/share/mate/applications/google-earth.desktop"
     94new_desktop_path="/usr/share/mate/applications/google-earth-pro.desktop"
    8995
    9096#Comprueba que el paquete se instalo correctamente
     
    97103                        zero-center set-non-configured zero-lliurex-gearth
    98104                        exit 1         
    99                                 exit 1         
     105                                       
    100106                else
    101107                        #Elimino el desktop para utilizar el proporcionado por lliurex-desktops-keeper
    102                         if [ -f $desktop_path ]; then
    103                                 rm -f $desktop_path
    104                         fi     
     108                        if [ -f $old_desktop_path ]; then
     109                                rm -f $old_desktop_path
     110                        fi
     111                        if [ -f $new_desktop_path ]; then
     112                                rm -f $new_desktop_path
     113                        fi             
    105114                fi
    106115
     
    108117                        rm -f $GEARTH_REPO_FILE
    109118                fi
     119
     120TEST_OLD=$( dpkg-query -s $OLD_PACKAGE_NAME 2> /dev/null| grep Status | cut -d " " -f 4 )
     121
     122if [ "$TEST_OLD" == 'installed' ]; then
     123        zenity --info --title="Zero-installer" --text="$MSG_REMOVE_OLD" > /dev/null 2>&1
     124        zero-installer remove $OLD_PACKAGE_NAME
     125fi
     126
     127
    110128zero-center remove-pulsating-color zero-lliurex-gearth
    111129zero-center set-configured zero-lliurex-gearth
Note: See TracChangeset for help on using the changeset viewer.