Du kan inte välja fler än 25 ämnen Ämnen måste starta med en bokstav eller siffra, kan innehålla bindestreck ('-') och vara max 35 tecken långa.

40 rader
1.0 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. echo "Installing dependencies..."
  10. echo "=========================="
  11. apt-get update
  12. apt-get -y install build-essential python-dev python-pip python-pygame supervisor git omxplayer
  13. echo "Installing hello_video..."
  14. echo "========================="
  15. git clone https://github.com/adafruit/pi_hello_video.git
  16. cd pi_hello_video
  17. ./rebuild.sh
  18. cd hello_video
  19. make install
  20. cd ../..
  21. rm -rf pi_hello_video
  22. echo "Installing video_looper program..."
  23. echo "=================================="
  24. cd "$(dirname "$0")"
  25. mkdir -p /mnt/usbdrive0 # This is very important if you put your system in readonly after
  26. python setup.py install --force
  27. cp video_looper.ini /boot/video_looper.ini
  28. echo "Configuring video_looper to run on start..."
  29. echo "==========================================="
  30. cp video_looper.conf /etc/supervisor/conf.d/
  31. service supervisor restart
  32. echo "Finished!"