Skip to content

Instantly share code, notes, and snippets.

@cpegel
Created March 15, 2019 15:24
Show Gist options
  • Save cpegel/9f93d5d3159d6f5847e8d29875c632ad to your computer and use it in GitHub Desktop.
Save cpegel/9f93d5d3159d6f5847e8d29875c632ad to your computer and use it in GitHub Desktop.
#!/bin/bash
if [[ "$ACTION" == "download" ]]; then
echo "New image from camera. Uploading ..."
scp -B "$ARGUMENT" summer:public_html/feed/
echo "Updating remote symlink ..."
ssh summer ln -s "~/public_html/feed/`basename $ARGUMENT`" "~/public_html/feed/current.jpg" -f
fi
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment