diff options
author | Matthew Lemon <y@yulqen.org> | 2024-10-27 17:12:35 +0000 |
---|---|---|
committer | Matthew Lemon <y@yulqen.org> | 2024-10-27 17:12:35 +0000 |
commit | f5bc9f423375a6f094fcc66e86efa9ddf56b6897 (patch) | |
tree | cc21e6530ff5fa0790222fa128ab1724ac0dc367 | |
parent | 45c384987077c49fcd6037f277e6c79a0ba0c5ee (diff) |
Adds script to upload images to twentyfoursoftware.co.uk
-rwxr-xr-x | post_images_to_t24s.bash | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/post_images_to_t24s.bash b/post_images_to_t24s.bash new file mode 100755 index 0000000..49926ea --- /dev/null +++ b/post_images_to_t24s.bash @@ -0,0 +1,13 @@ +#!/bin/bash + +if [[ "$#" -ne 2 ]]; then + printf "\n\nUsage: post_images_to_t24s.bash TITLE SOURCEDIR_NAME\nTITLE should be lowercase with no spaces.\nSOURCEDIR_NAME is directory containing optimised JPGs.\n\ +Don't be IN the sourcedir - point to it and don't bother with slashes.\n\nExample: post_images_to_t24s.bash day-out-in-berwick thumbnails.\n\n" + exit 1 +fi + +date=$(date +'%Y-%m-%d') +title=$1 +sourcedir=$2 + +rsync -avz "$(pwd)/$sourcedir/" pachelbel:/var/www/twentyfoursoftware.co.uk/pub/images/"$date-$title/" |