Last active
June 2, 2017 15:40
-
-
Save slavafomin/45efe4bf899148c5b04a to your computer and use it in GitHub Desktop.
Install Telegram on Ubuntu using shell automatically
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
#/usr/bin/env bash | |
set -o errexit | |
set -o pipefail | |
shopt -s nullglob | |
INSTALL_PATH="$HOME/Telegram" | |
TEMP_PATH="$HOME/.tmp" | |
sudo apt-get install xz-utils | |
# Installing the application | |
rm -Rf $INSTALL_PATH | |
rm -Rf $TEMP_PATH | |
mkdir -p $TEMP_PATH | |
wget -O - "https://tdesktop.com/linux" | tar -xpJf - -C $TEMP_PATH | |
mv $TEMP_PATH/Telegram $INSTALL_PATH | |
rm -Rf $TEMP_PATH | |
nohup $INSTALL_PATH/Telegram > /dev/null 2>&1 & | |
exo-desktop-item-edit --create-new \ | |
--type Application \ | |
--name Telegram \ | |
--command "$INSTALL_PATH/Telegram -- %u" \ | |
--icon telegram \ | |
$HOME/Desktop/ |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment