summaryrefslogtreecommitdiff
path: root/mksite.sh
diff options
context:
space:
mode:
authorMikhail Kobuk <[email protected]>2024-04-13 07:25:01 +0300
committerMikhail Kobuk <[email protected]>2024-04-13 07:25:01 +0300
commita7d18f81ac526cef6f5a1a9259e8f31d61a61f0c (patch)
treef2704c13d6ddbe381ace73e5b05872bec1b1d0f2 /mksite.sh
parent686e1a55b400b34cfb9c9808d73c8a456fcd7a46 (diff)
downloadlinux-labs-a7d18f81ac526cef6f5a1a9259e8f31d61a61f0c.tar.gz
linux-labs-a7d18f81ac526cef6f5a1a9259e8f31d61a61f0c.zip
update build system
Diffstat (limited to 'mksite.sh')
-rwxr-xr-xmksite.sh11
1 files changed, 6 insertions, 5 deletions
diff --git a/mksite.sh b/mksite.sh
index c0bbc8f..6c6b6cd 100755
--- a/mksite.sh
+++ b/mksite.sh
@@ -2,7 +2,8 @@
# USE: ./build.sh <pandoc> <pandoc_flags> <pandoc_format> [sources]
-sources=${@}
+sitedir=$1
+sources=${@:2}
echo "sources: ${sources}"
function process_dir() {
@@ -14,10 +15,10 @@ function process_dir() {
indir_out="${indir_src##*/}"
${panexec} ${panflags} ${indir_src} ${panformat} -o ../${indir_out%.*}.html
- mkdir ../site/${arg_dir}
+ mkdir ../${sitedir}/${arg_dir}
- cp -v ./*.png ../site/${arg_dir}
- mv -v ../${indir_out%.*}.html ../site/${arg_dir}/index.html
+ cp -v ./*.png ../${sitedir}/${arg_dir}
+ mv -v ../${indir_out%.*}.html ../${sitedir}/${arg_dir}/index.html
popd
}
@@ -37,7 +38,7 @@ for src in ${sources}; do
printf "\tfound md file: ${src}\n"
printf "\tmv -v ${src%.*}.html ../site/${src%.*}.html\n"
- mv -v ${src%.*}.html site/
+ mv -v ${src%.*}.html ${sitedir}/
else
printf "Unknown source (%s) - skipping\n" "$src"
fi