Skip to content

Instantly share code, notes, and snippets.

@sayak-sarkar
Last active November 30, 2020 22:52
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save sayak-sarkar/bfdc777eb30c9f6e879a80af3cf13009 to your computer and use it in GitHub Desktop.
Save sayak-sarkar/bfdc777eb30c9f6e879a80af3cf13009 to your computer and use it in GitHub Desktop.
Script to automatically install the Postman App [https://www.getpostman.com/] on Linux.
#!/bin/bash
cd /tmp || exit
echo "Downloading Postman ..."
wget https://dl.pstmn.io/download/latest/linux?arch=64 -O postman.tar.gz
tar -xzf postman.tar.gz
rm postman.tar.gz
echo "Installing to opt..."
if [ -d "/opt/Postman" ];then
sudo rm -rf /opt/Postman
fi
sudo mv Postman /opt/Postman
echo "Creating symbolic link..."
if [ -L "/usr/bin/postman" ];then
sudo rm -f /usr/bin/postman
fi
sudo ln -s /opt/Postman/Postman /usr/bin/postman
cat > ~/.local/share/applications/postman.desktop <<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
echo "Installation completed successfully."
echo "You can use Postman!"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment