Ignore:
Timestamp:
Jun 5, 2018, 1:07:05 PM (17 months ago)
Author:
jrpelegrina
Message:

Deleted files for the zenity version of the zomando

File:
1 edited

Legend:

Unmodified
Added
Removed
  • zero-lliurex-installers/trunk/fuentes/zero-lliurex-telegram.zmds/zero-lliurex-telegram.zmd

    r6047 r7353  
    11#!/bin/bash
    22#set -x
    3 PACKAGE_NAME="Telegram"
    4 
    5 #Get last version
    6 TCH_URL="https://desktop.telegram.org/changelog"
    7 TVERSION=$(wget -qO- $TCH_URL | sed -e 's/<[^>]*>//g;/^\s*$/d' | grep -o 'v [0-9.]*' -m1 | cut -d ' ' -f2)
    8 
    9 if [[ $(arch) == "x86_64" ]]
    10 then
    11         TSETUP="tsetup.${TVERSION}.tar.xz"
    12         TURL="https://updates.tdesktop.com/tlinux/"
    13 else
    14         TSETUP="tsetup32.${TVERSION}.tar.xz"
    15         TURL="https://updates.tdesktop.com/tlinux32/"
    16 fi
    17 
    18 #zero-center add-pulsating-color lliurex-zero-installer-telegram
    19 
    20 export TEXTDOMAIN="lliurex-zero-installer-telegram"
    21 zenity --question --title="Telegram" --text="$(gettext "Welcome to telegram installer for Lliurex\nThis will install Telegram on your computer. Continue?\n")"
    22 
    23 if [ $? -eq 0 ]
    24 then
    25         USERHOME=$(getent passwd $USER | cut -f6 -d ':')
    26         BINDIR=$USERHOME"/.local/bin"
    27         DESTDIR=$BINDIR"/telegram"
    28         mkdir -p $DESTDIR
    29         zero-lliurex-wget ${TURL}${TSETUP} ${DESTDIR}
    30         if [ -s ${DESTDIR}"/"${TSETUP} ]
    31         then
    32                 FIRSTPWD=$PWD
    33                 cd $DESTDIR
    34                 tar -Jxf $TSETUP
    35                 #Get user's main group
    36                 USER_GR=$(id -g -n ${USER})
    37                 chown -R ${USER}:${USER_GR} $BINDIR
    38                 if [ $? -eq 0 ]
    39                 then
    40                 su -c "notify-send -t 2000 -u normal -i /usr/share/icons/lliurex-neu/scalable/apps/zero-center.svg 'Zero-Installer' 'Package $PACKAGE_NAME has been installed in your system,'" $USER   
    41                         zero-center set-configured zero-lliurex-telegram
    42                 else
    43                 su -c "notify-send -t 2000 -u critical -i /usr/share/icons/lliurex-neu/scalable/apps/zero-center.svg 'Zero-Installer' 'Package $PACKAGE_NAME is not installed in your system, please  retry again or contact with Lliurex Team at http://mestreacasa.gva.es/web/lliurex/forums'" $USER   
    44                         rm -r $DESTDIR
    45                 fi
    46                 cd $FIRSTPWD
    47                 su $USER -c /usr/bin/telegram
    48         else
    49                 su -c "notify-send -t 2000 -u critical -i /usr/share/icons/lliurex-neu/scalable/apps/zero-center.svg 'Zero-Installer' 'Package $PACKAGE_NAME is not installed in your system, please  retry again or contact with Lliurex Team at http://mestreacasa.gva.es/web/lliurex/forums'" $USER   
    50                 rm -fr $DESTDIR
    51         fi
    52 fi
    53 zero-center remove-pulsating-color lliurex-zero-installer-telegram
    54 exit 0
     3epi-gtk /usr/share/zero-lliurex-telegram/telegram.epi
Note: See TracChangeset for help on using the changeset viewer.