09.install_appium.sh 1.1 KB

123456789101112131415161718192021222324252627282930313233343536
  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. cd || return
  11. $su apt-get -y --fix-missing install jq
  12. $su apt-get -y --fix-missing install npm cmake
  13. $su apt-get -y --fix-missing install node-opencv
  14. #$su npm install -g npm@latest
  15. $su npm cache clean --force
  16. $su npm rm -rf node_modules && $su rm -rf package-lock.json
  17. $su npm install -g appium --unsafe-perm=true --allow-root
  18. $su npm install -g appium-doctor
  19. #$su npm install -g opencv4nodejs --unsafe-perm=true --allow-root
  20. $su rm -rf package.json package-lock.json node_modules
  21. npm install wd
  22. # appium-desktop
  23. cd || return
  24. mkdir -p ~/Applications
  25. cd ~/Applications || return
  26. 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")"
  27. 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")"
  28. chmod +x ./*.AppImage
  29. cd - || return
  30. # FUSE
  31. $su apt install libfuse2