shithub: img

Download patch

ref: bfae4b0ac8b5ce076a1c8f7b51c7336ee5333bb5
parent: 033a6e5dcb780c01fe27f6fb4a379820cb91c876
author: Alex Musolino <amusolino@topcon.com>
date: Mon Nov 14 10:54:10 EST 2022

mkfile: drop "dirs" support and automatically populate "years"

--- a/mkfile
+++ b/mkfile
@@ -1,27 +1,13 @@
 MKSHELL=/bin/rc
 
-years=\
-	2008\
-	2009\
-	2013\
-	2014\
-	2015\
-	2018\
-	2019\
-	2020\
+years=`{ls | grep '^[0-9][0-9][0-9][0-9]$'}
 
-dirs=\
-	moto\
-	guns\
-	sssc\
-	group-shoot\
+fullsize=`{find $years -type f -name '*.full.*'}
 
-fullsize=`{find $years $dirs -type f -name '*.full.*'}
+montages=`{echo $years/^montage.jpg}
 
-montages=`{echo $years/^montage.jpg $dirs/^montage.jpg}
-
 index.html:D: $montages ./mkindex.rc ./mkfile
-	./mkindex.rc $years $dirs >index.html
+	./mkindex.rc $years >index.html
 
 %/montage.jpg: subdirs
 
@@ -30,17 +16,9 @@
 		cd $d
 		mk -f ../year.mk
 	}
-	for(d in $dirs)@{
-		cd $d
-		mk -f ../album.mk
-	}
 
 html clean nuke:V:
 	for(d in $years)@{
 		cd $d
 		mk -f ../year.mk $target
-	}
-	for(d in $dirs)@{
-		cd $d
-		mk -f ../album.mk $target
 	}