aboutsummaryrefslogtreecommitdiffstats
path: root/post_images_to_t24s.bash
diff options
context:
space:
mode:
Diffstat (limited to 'post_images_to_t24s.bash')
-rwxr-xr-xpost_images_to_t24s.bash13
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/"