2022-05-18 10:43:47 +03:00
|
|
|
#!/bin/sh
|
|
|
|
|
|
|
|
find source -name "*.md" >tmp
|
|
|
|
while IFS= read -r rawfile; do
|
|
|
|
file=$(echo "$rawfile" | sed "s|source/\(.*\)|\1|")
|
|
|
|
filename=$(basename "$file" ".md")
|
|
|
|
filedir=$(dirname "$file")
|
|
|
|
htmldir="html/${filedir}"
|
|
|
|
mdfile="${htmldir}/${filename}.md"
|
|
|
|
htmlfile="${htmldir}/${filename}.html"
|
|
|
|
mkdir -p "${htmldir}"
|
|
|
|
idris2 -c "${rawfile}"
|
2022-12-01 23:20:01 +03:00
|
|
|
ttc_version=$(ls build/ttc)
|
|
|
|
katla markdown "$rawfile" "build/ttc/${ttc_version}/source/${filename}.ttm" >"$mdfile"
|
2022-05-18 10:43:47 +03:00
|
|
|
markdown "$mdfile" >"$htmlfile"
|
|
|
|
# rm "$mdfile"
|
|
|
|
done <tmp
|
|
|
|
rm tmp
|