Last active
April 23, 2020 12:17
Script to install Official Telegram Desktop
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 | |
MACHINE_TYPE=`uname -m` | |
# Removing old versions | |
echo 'Removing old versions' | |
sudo rm -Rf /opt/telegram* | |
sudo rm -Rf /usr/bin/telegram | |
sudo rm -Rf /usr/share/applications/telegram.desktop | |
echo 'Identify Machine Type' | |
# Identify Machine Type | |
if [ ${MACHINE_TYPE} == 'x86_64' ]; then | |
wget "https://telegram.org/dl/desktop/linux" -O /tmp/telegram.tar.xz | |
else | |
wget "https://telegram.org/dl/desktop/linux32" -O /tmp/telegram.tar.xz | |
fi | |
# Extract the files | |
echo 'Extracting the files' | |
sudo tar Jxf /tmp/telegram.tar.xz -C /opt/ | |
sudo mv /opt/Telegram*/ /opt/telegram | |
# Create a shortcut on system | |
echo 'Creating symbol link' | |
sudo ln -sf /opt/telegram/Telegram /usr/bin/telegram | |
echo 'Installation finish' |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment