#!/bin/bash -i # Get install file wget https://dl.pstmn.io/download/latest/linux64 # Extract file sudo tar -xvf linux64 -C /usr/bin # export postman to env table if [[ $(which zsh) == "/usr/bin/zsh" ]]; then sudo -u $SUDO_USER echo '# Postman path' >> ~/.tempzshrc sudo -u $SUDO_USER echo 'export PATH="$PATH:/usr/bin/Postman"' >> ~/.tempzshrc fi # always put in bashrc aswell, so that the user can always rely on the standard shell sudo -u $SUDO_USER echo '# Postman path' >> ~/.bashrc sudo -u $SUDO_USER echo 'export PATH="$PATH:/usr/bin/Postman"' >> ~/.bashrc source ~/.bashrc # Create file and set info touch Postman.desktop { echo '[Desktop Entry]' echo 'Name=Postman API Tool' echo 'GenericName=Postman' echo 'Comment=Testing API' echo 'Exec=/usr/bin/Postman/Postman' echo 'Terminal=false' echo 'X-MultipleArgs=false' echo 'Type=Application' echo 'Icon=/usr/bin/Postman/app/resources/app/assets/icon.png' echo 'StartupWMClass=Postman' echo 'StartupNotify=true' } >> Postman.desktop # move file to applications sudo mv Postman.desktop /usr/share/applications/postman.desktop