install_tools_postman.sh 552 B

123456789101112131415161718192021222324252627
  1. #!/bin/bash
  2. # fail if any commands fails
  3. set -e
  4. # debug log
  5. #set -x
  6. # Set superuser privileges command if not set
  7. if [[ -z $su ]]; then
  8. export su="sudo"
  9. fi
  10. mkdir -p ~/bin
  11. cd ~/bin || return
  12. # Remove previous file
  13. rm -rf Postman-linux-x64.tar.gz
  14. # Download new version
  15. curl -o "Postman-linux-x64.tar.gz" -L "https://dl.pstmn.io/download/latest/linux64"
  16. # Remove previous directory
  17. rm -rf Postman
  18. # Remove previous symlink
  19. rm -f postman
  20. # Extract new version
  21. tar -xzvf Postman-linux-x64.tar.gz
  22. # Create new symlink
  23. ln -s Postman/app/Postman postman