Skip to content

Instantly share code, notes, and snippets.

@hedcler
Forked from makiftasova/install-telegram.sh
Created October 31, 2016 11:25
Show Gist options
  • Save hedcler/47479adf701e3f36304a56aa244b9f23 to your computer and use it in GitHub Desktop.
Save hedcler/47479adf701e3f36304a56aa244b9f23 to your computer and use it in GitHub Desktop.
A simple (and silly) bash script to adding Telegram's desktop app to PATH which wirtten as a quick hack. Tested on Fedora 21
#!/bin/bash
# Author: Mehmet Akif TAŞOVA <[email protected]>
# A simple (and silly) bash script to adding Telegram's
# desktop app to PATH which wirtten as a quick hack
# Just put this script alongsite Telegram and Updater
# executables from Telegram's desktop app package
# then run this script as root user
# To downlaod Telegram's Linux desktop app
# you can visit: https://desktop.telegram.org/
# Make sure only root can run our script
if [[ $EUID -ne 0 ]]; then
echo "This script must be run as root" 1>&2
exit 1
fi
mkdir /opt/telegram
cp Telegram /opt/telegram/.
cp Updater /opt/telegram/.
echo -e TELEGRAM_HOME=/opt/telegram $'\n'export TELEGRAM_HOME $'\n'PATH=\$PATH:\$TELEGRAM_HOME $'\n'export PATH > telegram.sh
cp telegram.sh /etc/profile.d/.
rm telegram.sh
echo "Install complete."
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment