source: zero-lliurex-installers/trunk/EPI_FILES/fuentes/zero-lliurex-telegram.install/usr/bin/telegram @ 6603

Last change on this file since 6603 was 6603, checked in by jrpelegrina, 21 months ago

WIP in migration telegram zmd to epi

  • Property svn:executable set to *
File size: 1.0 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        LANG=es_ES.UTF-8 $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=telegram
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.