hare

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

gen-docs (661B)


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