Created
July 24, 2016 20:37
-
-
Save thenets/764eac22769b879d174a6f3f89c3ef71 to your computer and use it in GitHub Desktop.
Telegram Installer Script
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Create installation dir | |
mkdir ~/.apps/ | |
# Remove old version | |
rm -R ~/.apps/Telegram/ | |
# Download and extract | |
cd ~/.apps/ | |
wget https://tdesktop.com/linux -O "telegram.tar.xz" | |
tar -xf ./telegram.tar.xz | |
# Create desktop shortcut | |
cd ./Telegram | |
wget https://desktop.telegram.org/img/td_logo.png -O icon.png | |
pwd=$(pwd) | |
echo '#!/usr/bin/env xdg-open' > telegram.desktop | |
echo '[Desktop Entry]' >> telegram.desktop | |
echo 'Version=1.0' >> telegram.desktop | |
echo 'Terminal=false' >> telegram.desktop | |
echo 'Type=Application' >> telegram.desktop | |
echo 'Name=Telegram' >> telegram.desktop | |
echo 'Exec='$pwd'/Telegram' >> telegram.desktop | |
echo 'Icon='$pwd'/icon.png' >> telegram.desktop | |
mkdir ~/Desktop/ | |
cp ./telegram.desktop ~/Desktop/telegram.desktop | |
# Remove downloaded useless files | |
rm ../telegram.tar.xz |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment