Skip to content

Instantly share code, notes, and snippets.

@slavafomin
Last active June 2, 2017 15:40
Show Gist options
  • Save slavafomin/45efe4bf899148c5b04a to your computer and use it in GitHub Desktop.
Save slavafomin/45efe4bf899148c5b04a to your computer and use it in GitHub Desktop.
Install Telegram on Ubuntu using shell automatically
#/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