mirror of
https://github.com/idris-lang/Idris2.git
synced 2024-12-27 13:43:28 +03:00
18 lines
511 B
Bash
Executable File
18 lines
511 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}"
|
|
katla markdown "$rawfile" "build/ttc/source/${filename}.ttm" >"$mdfile"
|
|
markdown "$mdfile" >"$htmlfile"
|
|
# rm "$mdfile"
|
|
done <tmp
|
|
rm tmp
|