-
-
Save HussainDerry/bf526a7c2813a813d937614236f3cafe to your computer and use it in GitHub Desktop.
Download and install the latest version of Postman for Ubuntu. Create .desktop file.
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 | |
| INSTALL_DIR=/opt/postman | |
| if [ "$(whoami)" != "root" ] | |
| then | |
| echo "Sorry, you are not root. Use sudo!" | |
| exit 1 | |
| fi | |
| echo "Downloading the latest Postman to /tmp" | |
| cd /tmp | |
| curl -Lo postman.tar.gz "https://dl.pstmn.io/download/latest/linux64" | |
| tar -xzf /tmp/postman.tar.gz | |
| rm /tmp/postman.tar.gz | |
| echo "Removing old Postman..." | |
| rm -rf $INSTALL_DIR | |
| echo "Copying new Postman..." | |
| mv /tmp/Postman* $INSTALL_DIR | |
| ln -sf $INSTALL_DIR/Postman /usr/bin/postman | |
| echo "Creating postman.desktop file..." | |
| cat > /usr/share/applications/postman.desktop <<EOL | |
| [Desktop Entry] | |
| Encoding=UTF-8 | |
| Name=Postman | |
| Exec=postman | |
| Icon=$INSTALL_DIR/resources/app/assets/icon.png | |
| Type=Application | |
| StartupNotify=false | |
| OnlyShowIn=Unity; | |
| Categories=Development; | |
| EOL | |
| echo "New Postman has been installed!" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment