Skip to content

Instantly share code, notes, and snippets.

@mscalora
Created July 4, 2017 22:14
Show Gist options
  • Save mscalora/850158c52d31d23ccd4c4b77a15bb158 to your computer and use it in GitHub Desktop.
Save mscalora/850158c52d31d23ccd4c4b77a15bb158 to your computer and use it in GitHub Desktop.
download files to raspberry pi slideshow system
#! /usr/bin/env bash
echo Syncing $(date) >>/var/log/show.log
ls -1R data/?/*.jp*g >before.txt
rsync -av --include="/?/" --include="/?/*" --exclude="*" --include=1 h4g:"www/cdpf-sites/kitchen/data/" /home/pi/data
ls -1R data/?/*.jp*g >after.txt
if diff before.txt before.txt | egrep '\.jp.?g' >diff.txt ; then
echo 'Updates!'
fi
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment