Skip to content

Instantly share code, notes, and snippets.

@thenets
Created July 24, 2016 20:37
Show Gist options
  • Save thenets/764eac22769b879d174a6f3f89c3ef71 to your computer and use it in GitHub Desktop.
Save thenets/764eac22769b879d174a6f3f89c3ef71 to your computer and use it in GitHub Desktop.
Telegram Installer Script
# 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