fmt: format using shfmt

This commit is contained in:
silver 2024-05-13 23:41:52 +01:00
parent d4869448fb
commit e6969ab164
Signed by: silver
GPG key ID: 54E2C71918E93B74
2 changed files with 92 additions and 95 deletions

View file

@ -15,7 +15,7 @@ rm -f .md.toml
# if the user only wants teh html tehn early return
if [[ $1 == "html" ]]; then
exit 0;
exit 0
fi
# recursively parse _Handovers_html use wkhtmltopdf to convert to pdf
@ -23,30 +23,30 @@ cd _Handovers_html
out_folder="../_Handovers_pdf"
rm -rf "$out_folder"
for d in */ ; do
# skip symlinks
[ -L "''${d%/}" ] && continue
# exclude teh template fodler
if [[ $d == *"_Templates"* ]]; then
continue
fi
for d in */; do
# skip symlinks
[ -L "''${d%/}" ] && continue
# exclude teh template fodler
if [[ $d == *"_Templates"* ]]; then
continue
fi
# create output folder
mkdir -p "$out_folder/$d"
# create output folder
mkdir -p "$out_folder/$d"
# iterate the files
for file in $d*.html; do
if [ -f "$file" ]; then
# iterate the files
for file in $d*.html; do
if [ -f "$file" ]; then
# we need teh filename/path
stripped=''${file/.html/""}
# we need teh filename/path
stripped=''${file/.html/""}
echo "$out_folder/$stripped.pdf"
echo "$out_folder/$stripped.pdf"
# convert teh html to pdf
wkhtmltopdf -q --enable-local-file-access --no-stop-slow-scripts "$stripped.html" "$out_folder/$stripped.pdf" 2>> ../errors.log &
fi
done
# convert teh html to pdf
wkhtmltopdf -q --enable-local-file-access --no-stop-slow-scripts "$stripped.html" "$out_folder/$stripped.pdf" 2>>../errors.log &
fi
done
done
cd ../
cd ../