From 49291170dec8a37d39d382a43dbf77a9562d4e70 Mon Sep 17 00:00:00 2001 From: c0dev0id Date: Thu, 5 Jan 2023 13:10:18 +0100 Subject: [PATCH] Sync photos before creating the gallery --- Makefile | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/Makefile b/Makefile index 010c0f4..8788464 100644 --- a/Makefile +++ b/Makefile @@ -10,6 +10,10 @@ all: build-and-upload-all # Create the photo galleries and create the index and preview html pages. PHOTODIRS != find photos/* -maxdepth 0 -mindepth 0 -type d +get-photos: + [ ! -d "photos" ] \ + && git clone sdk@home.codevoid.de:.photos.git photos \ + || cd photos && git pull photos: ${PHOTODIRS} mkdir -p ${SITE}/photos cd photos && sh ${SCRIPTS}/mkphotoindex.sh > index.html @@ -20,7 +24,7 @@ photos: ${PHOTODIRS} find photos -type f \( -name "*.html" \ -o -name "*.meta" \ \) -exec install -D {} site/{} \; -${PHOTODIRS}: +${PHOTODIRS}: get-photos cd "$@" && sh ${SCRIPTS}/mkphotos.sh > index.html # (manual step) - it takes some time to optimize all images and it's not really necessary.