update_appium_desktop_linux.sh 665 B

1234567891011121314151617181920212223
  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. $su apt-get update -qq
  11. $su apt-get install -qq -y curl
  12. cd || return
  13. mkdir -p ~/Applications
  14. cd ~/Applications || return
  15. curl -O -L "$(curl -s https://api.github.com/repos/appium/appium-desktop/releases/latest | jq -r ".assets[] | select(.name | test(\"AppImage\")) | .browser_download_url")"
  16. curl -O -L "$(curl -s https://api.github.com/repos/appium/appium-inspector/releases/latest | jq -r ".assets[] | select(.name | test(\"AppImage\")) | .browser_download_url")"
  17. chmod +x ./*.AppImage
  18. cd - || return