Skip to content

Instantly share code, notes, and snippets.

@AdnaneX
Created July 25, 2019 10:27
Show Gist options
  • Save AdnaneX/82580f52efaa59a3b9ace95627890beb to your computer and use it in GitHub Desktop.
Save AdnaneX/82580f52efaa59a3b9ace95627890beb to your computer and use it in GitHub Desktop.
sh script for update or install postman latest version
#!/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