You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

45 rivejä
1.1 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 python-dev python-pip python-pygame supervisor git omxplayer
  13. #check if hello_video should be installed
  14. if [ "$*" != "no_hello_video" ]
  15. then
  16. echo "Installing hello_video..."
  17. echo "========================="
  18. apt-get -y install build-essential
  19. git clone https://github.com/adafruit/pi_hello_video.git
  20. cd pi_hello_video
  21. ./rebuild.sh
  22. cd hello_video
  23. make install
  24. cd ../..
  25. rm -rf pi_hello_video
  26. fi
  27. echo "Installing video_looper program..."
  28. echo "=================================="
  29. mkdir -p /mnt/usbdrive0 # This is very important if you put your system in readonly after
  30. python setup.py install --force
  31. cp video_looper.ini /boot/video_looper.ini
  32. echo "Configuring video_looper to run on start..."
  33. echo "==========================================="
  34. cp video_looper.conf /etc/supervisor/conf.d/
  35. service supervisor restart
  36. echo "Finished!"