aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
Diffstat (limited to '')
-rwxr-xr-xpost_images_to_t24s.bash6
1 files changed, 5 insertions, 1 deletions
diff --git a/post_images_to_t24s.bash b/post_images_to_t24s.bash
index 49926ea..07dcf6c 100755
--- a/post_images_to_t24s.bash
+++ b/post_images_to_t24s.bash
@@ -2,7 +2,7 @@
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"
+Don't be IN the sourcedir, but be in the directory where the JPGs are you need to resize. Don't bother with slashes.\n\nExample: post_images_to_t24s.bash day-out-in-berwick thumbnails.\n\n"
exit 1
fi
@@ -10,4 +10,8 @@ date=$(date +'%Y-%m-%d')
title=$1
sourcedir=$2
+echo "Resizing the images..."
+magick mogrify -path "$sourcedir" -resize 30% -quality 80 *.jpg
+
+echo "Pushing to the server..."
rsync -avz "$(pwd)/$sourcedir/" pachelbel:/var/www/twentyfoursoftware.co.uk/pub/images/"$date-$title/"