feat: stop copying source over, and make less dirs for cleaner output

This commit is contained in:
Darragh Elliott 2024-09-13 19:28:57 +01:00
parent e2a0ce5ff2
commit 3049db5e9d
2 changed files with 3 additions and 16 deletions

View File

@ -18,14 +18,12 @@ dir_maker(){
curpath="$output"
find "$input" -depth -type d \
\! -path '*/.svn' \! -path '*/.svn/*' \
\! -path '*/.git' \! -path '*/.git/*' \
-regex "$input/[a-z\.]+\.[a-z]+\(/.*\)?" \
-printf '%P\n' \
| while read filepath; do
| while read -r filepath; do
oldpath="$curpath"
curpath="$output/$filepath/"
srcdir="$output/source/$filepath/"
match "$oldpath" "^$curpath" || mkdir -p "$curpath" "$srcdir"
match "$oldpath" "^$curpath" || mkdir -p "$curpath"
done
}

View File

@ -213,17 +213,6 @@ all: \$(COPY_DST_FILES)
echo "* Linking file \$*"
ln -sf "\$<" "\$@"
# -----------------------------------------------------------------------------
# Copy .xhtml files to "source" directory in target directory tree
# -----------------------------------------------------------------------------
SOURCE_DST_FILES := \$(sort \$(patsubst \$(INPUTDIR)/%,\$(OUTPUTDIR)/source/%,\$(HTML_SRC_FILES)))
all: \$(SOURCE_DST_FILES)
\$(SOURCE_DST_FILES): \$(OUTPUTDIR)/source/%: \$(INPUTDIR)/%
echo "* Linking source \$*"
ln -sf "\$<" "\$@"
# -----------------------------------------------------------------------------
# Clean up excess files in target directory
# -----------------------------------------------------------------------------