mirror of
https://github.com/idris-lang/Idris2.git
synced 2024-09-11 13:36:08 +03:00
19 lines
558 B
Bash
Executable File
19 lines
558 B
Bash
Executable File
#!/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}"
|
|
ttc_version=$(ls build/ttc)
|
|
katla markdown "$rawfile" "build/ttc/${ttc_version}/source/${filename}.ttm" >"$mdfile"
|
|
markdown "$mdfile" >"$htmlfile"
|
|
# rm "$mdfile"
|
|
done <tmp
|
|
rm tmp
|