fmt: format using shfmt

This commit is contained in:
silver 2024-05-13 23:41:52 +01:00
parent d4869448fb
commit e6969ab164
Signed by untrusted user: 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,7 +23,7 @@ cd _Handovers_html
out_folder="../_Handovers_pdf"
rm -rf "$out_folder"
for d in */ ; do
for d in */; do
# skip symlinks
[ -L "''${d%/}" ] && continue
# exclude teh template fodler
@ -44,7 +44,7 @@ for d in */ ; do
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 &
wkhtmltopdf -q --enable-local-file-access --no-stop-slow-scripts "$stripped.html" "$out_folder/$stripped.pdf" 2>>../errors.log &
fi
done
done

View file

@ -3,7 +3,7 @@
root="$PWD"
# make teh html files first
function build_html(){
function build_html() {
# wipe and reset teh old html folder
rm -rf Minutes_html
mkdir Minutes_html
@ -14,7 +14,7 @@ function build_html(){
cd Minutes
# loop through each year worth of data
for year in */ ; do
for year in */; do
# skip symlinks
[ -L "''${year%/}" ] && continue
# exclude teh template fodler
@ -58,8 +58,7 @@ function build_html(){
cd $root
}
function build_pdf(){
function build_pdf() {
# used to match **
shopt -s globstar
@ -86,7 +85,7 @@ function build_pdf(){
# have someplace for it to go
mkdir -p $(dirname $output)
wkhtmltopdf -q --enable-local-file-access --no-stop-slow-scripts "$file" "$output" 2>> ../errors.log &
wkhtmltopdf -q --enable-local-file-access --no-stop-slow-scripts "$file" "$output" 2>>../errors.log &
fi
done
@ -94,9 +93,7 @@ function build_pdf(){
cd $root
}
if [[ $1 == "html" ]];
then
if [[ $1 == "html" ]]; then
build_html
else
build_html