08.install_appium.sh 878 B

12345678910111213141516171819202122232425262728
  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. # appium
  11. $su pacman -Sy --noconfirm --needed npm cmake
  12. $su pacman -Sy --noconfirm --needed opencv
  13. $su npm install -g appium --unsafe-perm=true --allow-root
  14. $su npm install -g appium-doctor
  15. #$su npm install -g opencv4nodejs --unsafe-perm=true --allow-root
  16. npm install wd
  17. # appium-desktop
  18. cd || return
  19. mkdir -p ~/bin
  20. cd ~/bin || return
  21. 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")"
  22. 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")"
  23. chmod +x ./*.AppImage
  24. cd - || return