#!/bin/mksh # # Generates JSDoc in the /jsdoc dir. Clears any existing jsdoc there. set -e case $KSH_VERSION { (*MIRBSD\ KSH*) ;; (*) echo E: do not call me with bash or something; exit 255 ;; } v=$(sed -n '/^Dygraph.VERSION = "\(.*\)";$/s//\1/p' &1 | tee jsdoc.tmp/.errs if test -s jsdoc.tmp/.errs; then errs=true; else errs=false; fi rm -rf jsdoc.tmp if $errs; then echo Please fix any jsdoc errors/warnings exit 1 fi chmod -R a+rX jsdoc echo Done