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

Last change on this file since 3798 was 3798, checked in by Juanma, 2 years ago

WIP on telegram wrapper

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