Sync photos before creating the gallery

This commit is contained in:
c0dev0id 2023-01-05 13:10:18 +01:00
parent 891a019ed4
commit 49291170de

View File

@ -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.