source: zero-lliurex-installers/trunk/fuentes/zero-lliurex-telegram.install/usr/bin/lliurex-telegram.sh @ 5680

Last change on this file since 5680 was 5680, checked in by Juanma, 23 months ago

Added translations for telegram installer

  • Property svn:executable set to *
File size: 1.1 KB
Line 
1#!/bin/bash
2#Wrapper for telegram
3#Adds info in the user's telegram.desktop
4####
5TELEGRAM=${HOME}"/.local/bin/telegram/Telegram/Telegram"
6TDESKTOPPATH=${HOME}"/.local/share/applications"
7TDESKTOP=${TDESKTOPPATH}"/zero-lliurex-telegram.desktop"
8OLD_TDESKTOP=${TDESKTOPPATH}"/telegramdesktop.desktop"
9RS=0
10if [ ! -x $TELEGRAM ]
11then
12        zenity --error --title "Telegram" --text "Telegram not found at $TELEGRAM"
13        RS=1
14else
15        $TELEGRAM
16        #When finished regenerates the .desktop
17        [ -a $TDESKTOPPATH ] || mkdir $TDESKTOPPATH -p
18        echo "[Desktop Entry]
19Encoding=UTF-8
20Version=1.0
21Name=Telegram Desktop
22Comment=Official desktop version of Telegram messaging app
23Comment[es]=Versión oficial de Telegram Desktop
24Comment[ca]=Versió oficial del Telegram Desktop
25Comment[ca_ES@valencia]=Versió oficial del Telegram Desktop
26Exec=/usr/bin/lliurex-telegram.sh
27Icon=telegram
28Terminal=false
29StartupWMClass=Telegram
30Type=Application
31Categories=Network;
32MimeType=x-scheme-handler/tg;
33X-Desktop-File-Install-Version=0.22
34">$TDESKTOP
35        if [ -e $OLD_TDESKTOP ]
36        then
37                rm $OLD_TDESKTOP 
38        fi
39fi
40exit $RS
Note: See TracBrowser for help on using the repository browser.