LeadKit/project-scripts/gen_docs_from_playgrounds.sh

24 lines
607 B
Bash
Executable File

#!/bin/sh
# Description:
# Generates markdown documentation from nef playgrounds.
#
# Required environment variables:
# SRCROOT - path to project folder.
#
if [ -z ${SRCROOT} ]; then
echo SRCROOT environment variable not set
echo Run \'source setup\' to set SRCROOT environment variable
exit 1
fi
for module_name in $(cat ${SRCROOT}/project-scripts/ordered_modules_list.txt); do
APP_FILE=${SRCROOT}/${module_name}/${module_name}.app
if [ -d "$APP_FILE" ]; then
nef compile --project $APP_FILE
nef markdown --project $APP_FILE --output ${SRCROOT}/docs
fi
done