您最多选择25个主题 主题必须以字母或数字开头,可以包含连字符 (-),并且长度不得超过35个字符

49 行
1.2 KiB

  1. #!/bin/sh
  2. # Error out if anything fails.
  3. set -e
  4. # Make sure script is run as root.
  5. if [ "$(id -u)" != "0" ]; then
  6. echo "Must be run as root with sudo! Try: sudo ./install.sh"
  7. exit 1
  8. fi
  9. if [ "$*" != "no_hello_video" ]
  10. then
  11. echo "Installing without hello_video"
  12. echo "=========================="
  13. fi
  14. echo "Installing dependencies..."
  15. echo "=========================="
  16. apt-get update
  17. apt-get -y install python-dev python-pip python-pygame supervisor git omxplayer
  18. #check if hello_video should be installed
  19. if [ "$*" != "no_hello_video" ]
  20. then
  21. echo "Installing hello_video..."
  22. echo "========================="
  23. apt-get -y install build-essential
  24. git clone https://github.com/adafruit/pi_hello_video.git
  25. cd pi_hello_video
  26. ./rebuild.sh
  27. cd hello_video
  28. make install
  29. cd ../..
  30. rm -rf pi_hello_video
  31. fi
  32. echo "Installing video_looper program..."
  33. echo "=================================="
  34. mkdir -p /mnt/usbdrive0 # This is very important if you put your system in readonly after
  35. python setup.py install --force
  36. cp video_looper.ini /boot/video_looper.ini
  37. echo "Configuring video_looper to run on start..."
  38. echo "==========================================="
  39. cp video_looper.conf /etc/supervisor/conf.d/
  40. service supervisor restart
  41. echo "Finished!"