Skip to content

Instantly share code, notes, and snippets.

@mrroot5
Forked from jalcaldea/telegram-installer.sh
Created October 29, 2016 16:29
Show Gist options
  • Select an option

  • Save mrroot5/a29a4c6f67a2eece12aa8404c7c7eaec to your computer and use it in GitHub Desktop.

Select an option

Save mrroot5/a29a4c6f67a2eece12aa8404c7c7eaec to your computer and use it in GitHub Desktop.

Revisions

  1. Adrián Garrido revised this gist Oct 29, 2016. 1 changed file with 1 addition and 1 deletion.
    2 changes: 1 addition & 1 deletion telegram-installer.sh
    Original file line number Diff line number Diff line change
    @@ -10,7 +10,7 @@ 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/icon_256x256@2x.png > icon.png
    wget -O - https://telegram.org/img/t_logo.png > icon.png

    echo "Making destination folder..."

  2. @jalcaldea jalcaldea revised this gist Nov 14, 2014. 1 changed file with 3 additions and 2 deletions.
    5 changes: 3 additions & 2 deletions telegram-installer.sh
    100644 → 100755
    Original file line number Diff line number Diff line change
    @@ -25,7 +25,8 @@ 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..."

    @@ -55,4 +56,4 @@ rm -R /tmp/Telegram

    echo "Installation Complete! Launching Telegram..."

    /usr/share/telegram/Updater &
    /usr/share/telegram/Updater &
  3. @jalcaldea jalcaldea created this gist Sep 15, 2014.
    58 changes: 58 additions & 0 deletions telegram-installer.sh
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,58 @@
    #!/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


    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 &