Skip to content

Instantly share code, notes, and snippets.

@makiftasova
Created February 10, 2015 21:47
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save makiftasova/22836f8b1c9750d10449 to your computer and use it in GitHub Desktop.
Save makiftasova/22836f8b1c9750d10449 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 <makiftasova@gmail.com>
# 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