Handle subdirectories
This commit is contained in:
parent
9eb79fd50d
commit
ab2a11a436
|
@ -4,7 +4,7 @@
|
|||
|
||||
body {
|
||||
background-color: #24282c;
|
||||
background-image: url('img/bg.gif');
|
||||
background-image: url('/~lucidiot/img/bg.gif');
|
||||
background-repeat: repeat;
|
||||
}
|
||||
#main {
|
||||
|
|
18
build.sh
18
build.sh
|
@ -42,8 +42,16 @@ tree --du --si -X --prune -P '*.html' | xsltproc ../xsl/tree.xsl - >> "$tree_fil
|
|||
popd >/dev/null
|
||||
convert "$tree_file" "html/everything.html"
|
||||
|
||||
for src in assets/*; do
|
||||
dest="${src/#assets/html}"
|
||||
echo "Symlinking $src to $dest"
|
||||
ln -fTs "../$src" "$dest"
|
||||
done
|
||||
function link_assets {
|
||||
for src in "$1"/*; do
|
||||
dest="${src/#assets/html}"
|
||||
if [ ! -h "$dest" ] && [ -d "$dest" ]; then
|
||||
link_assets "$src"
|
||||
else
|
||||
echo "Symlinking $src to $dest"
|
||||
ln -fTs "$(echo "$dest" | sed 's|[^/]*/|../|g;s|/[^/]*$||')/$src" "$dest"
|
||||
fi
|
||||
done
|
||||
}
|
||||
|
||||
link_assets assets
|
||||
|
|
Loading…
Reference in New Issue