Created
July 25, 2019 10:27
-
-
Save AdnaneX/82580f52efaa59a3b9ace95627890beb to your computer and use it in GitHub Desktop.
sh script for update or install postman latest version
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 | |
ICON_PATH=~/.local/share/applications/postman.desktop | |
LN_PATH=/usr/bin/postman | |
cd ~/Downloads | |
wget https://dl.pstmn.io/download/latest/linux64 -O postman.tar.gz | |
tar -xzf postman.tar.gz -C /opt | |
rm postman.tar.gz | |
if [[ ! -e $LN_PATH ]]; then | |
ln -s /opt/Postman/Postman $LN_PATH | |
fi | |
if [[ ! -e $ICON_PATH ]]; then | |
cat > $ICON_PATH <<EOL | |
[Desktop Entry] | |
Encoding=UTF-8 | |
Name=Postman | |
Exec=postman | |
Icon=/opt/Postman/app/resources/app/assets/icon.png | |
Terminal=false | |
Type=Application | |
Categories=Development; | |
EOL | |
chmod 755 $ICON_PATH | |
fi |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment