Skip to content

Instantly share code, notes, and snippets.

@Dkendal
Last active April 6, 2017 16:39
Show Gist options
  • Save Dkendal/1a9d0e0a1503d88261ddd6b4b8495616 to your computer and use it in GitHub Desktop.
Save Dkendal/1a9d0e0a1503d88261ddd6b4b8495616 to your computer and use it in GitHub Desktop.
Screengrab and upload to s3
#!/bin/sh
BUCKET_NAME=dkendal-screenshots
BUCKET=s3:$BUCKET_NAME/
FILE_NAME=`date +%s`.png
GRAB_PATH=~/screenshots/$FILE_NAME
UPLOAD_PATH=https://s3.amazonaws.com/dkendal-screenshots/$FILE_NAME
escrotum -s $GRAB_PATH
rclone copy $GRAB_PATH $BUCKET
echo $UPLOAD_PATH | xclip -selection p
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment