Last active
April 5, 2020 15:06
-
-
Save jalcaldea/acb22b21a8c9f0728198 to your computer and use it in GitHub Desktop.
Small script that simplifies Telegram installation in ubuntu.
This file contains 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 | |
echo "=============================================" | |
echo "== Telegram Script Installer v 0.1 ==" | |
echo "== ==" | |
echo "== by Jalcaldea ==" | |
echo "=============================================" | |
echo "Downloading necesary files..." | |
cd /tmp | |
wget -O - https://tdesktop.com/linux > tsetup.tar.gz | |
wget -O - https://raw.githubusercontent.com/telegramdesktop/tdesktop/master/Telegram/Telegram/Images.xcassets/Icon.iconset/[email protected] > icon.png | |
echo "Making destination folder..." | |
sudo mkdir /usr/share/telegram | |
sudo chmod +x /usr/share/telegram | |
echo "Extracting files..." | |
tar -xvJf tsetup.tar.gz | |
cd ./Telegram | |
echo "Copying new files..." | |
sudo cp ./Updater /usr/share/telegram/Updater | |
sudo cp ./Telegram /usr/share/telegram/Telegram | |
user=$(whoami) | |
sudo chown -R $user:$user /usr/share/telegram/. | |
echo "Making desktop files..." | |
cd /tmp | |
sudo echo "[Desktop Entry]" > telegram.desktop | |
sudo echo "Name=Telegram" >> telegram.desktop | |
sudo echo "GenericName=Chat" >> telegram.desktop | |
sudo echo "Comment=Chat with yours friends" >> telegram.desktop | |
sudo echo "Exec=/usr/share/telegram/Telegram" >> telegram.desktop | |
sudo echo "Terminal=false" >> telegram.desktop | |
sudo echo "Type=Application" >> telegram.desktop | |
sudo echo "Icon=/usr/share/telegram/icon.png" >> telegram.desktop | |
sudo echo "Categories=Network;Chat;" >> telegram.desktop | |
sudo echo "StartupNotify=false" >> telegram.desktop | |
sudo cp icon.png /usr/share/telegram/icon.png | |
sudo cp telegram.desktop /usr/share/applications/telegram.desktop | |
echo "Removing old files..." | |
rm /tmp/tsetup.tar.gz | |
rm /tmp/icon.png | |
rm /tmp/telegram.desktop | |
rm -R /tmp/Telegram | |
echo "Installation Complete! Launching Telegram..." | |
/usr/share/telegram/Updater & |
You should probably check to see if /usr/share/telegram
and create it if i doesn't otherwise continue on.
installdir="/usr/share/telegram"
if [ ! -d ${installdir} ];then
mkdir ${installdir}
else
echo "${installdir} exists...moving on"
fi
Awesome, thank you! :)
Hi! logo image not found. Try this:
wget -O - https://telegram.org/img/t_logo.png > icon.png
Hope it helps :-)
Link to download changed, line 12 should be :
wget -O - https://telegram.org/dl/desktop/linux > tsetup.tar.gz
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Thank you!