update_postman.sh 518 B

1234567891011121314151617181920212223242526
  1. #!/bin/bash
  2. # fail if any commands fails
  3. set -e
  4. # debug log
  5. #set -x
  6. $su apt-get update -qq
  7. $su apt-get install -qq -y curl
  8. mkdir -p ~/bin
  9. cd ~/bin || return
  10. # Remove previous file
  11. rm -rf Postman-linux-x64.tar.gz
  12. # Download new version
  13. curl -o "Postman-linux-x64.tar.gz" -L "https://dl.pstmn.io/download/latest/linux64"
  14. # Remove previous directory
  15. rm -rf Postman
  16. # Remove previous symlink
  17. rm -f postman
  18. # Extract new version
  19. tar -xzvf Postman-linux-x64.tar.gz
  20. # Create new symlink
  21. ln -s Postman/app/Postman postman