Skip to content

Instantly share code, notes, and snippets.

@diegoponciano
Forked from slavafomin/install-telegram.sh
Last active June 2, 2017 15:41
Show Gist options
  • Save diegoponciano/f99c84187f739f60af02fa890fcc4d56 to your computer and use it in GitHub Desktop.
Save diegoponciano/f99c84187f739f60af02fa890fcc4d56 to your computer and use it in GitHub Desktop.
Install Telegram on Ubuntu using shell automatically
#!/bin/bash
set -o errexit
set -o pipefail
shopt -s nullglob
INSTALL_PATH="$HOME/opt/Telegram"
TEMP_PATH="$HOME/.tmp"
sudo apt-get install exo-utils xz-utils
# Installing the application
rm -Rf $INSTALL_PATH
rm -Rf $TEMP_PATH
mkdir -p $INSTALL_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