hare

[hare] The Hare programming language
git clone https://git.torresjrjr.com/hare.git
Log | Files | Refs | README | LICENSE

gen-docs.sh (674B)


      1 # Yes, I am entirely aware that this is a hack
      2 srcdir="$(dirname "$0")"
      3 getmods() (
      4 	DOCS=1
      5 	. "$srcdir"/gen-stdlib
      6 	IFS="
      7 "
      8 	for module in $modules; do
      9 		if [ -z "$(echo "$module" | cut -sf1)" ]
     10 		then
     11 			echo "$module"
     12 		else
     13 			module="$(echo "$module" | cut -sf1)"
     14 			echo $module
     15 		fi
     16 	done
     17 	# Not listed in the stdlib for various reasons:
     18 	echo crypto::keystore
     19 	echo mime
     20 )
     21 modules="$(getmods)"
     22 
     23 mkdir -p docs/html/
     24 
     25 "$BINOUT"/haredoc -Fhtml > docs/html/index.html
     26 for mod in $modules format encoding math crypto hare rt
     27 do
     28 	echo $mod
     29 	path="$(echo $mod | sed -e 's?::?/?g')"
     30 	mkdir -p docs/html/$path
     31 	"$BINOUT"/haredoc -Fhtml $mod > docs/html/$path/index.html
     32 done