-
-
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
This file contains hidden or 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
#!/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