2013-02-09 01:33:48 +00:00
|
|
|
#!/usr/bin/env bash
|
|
|
|
cd $(cd $(dirname $0); pwd)
|
|
|
|
|
|
|
|
(
|
|
|
|
while IFS='' read -r l
|
|
|
|
do
|
2010-01-05 22:27:55 +00:00
|
|
|
if [[ "$l" == "{{VE-LOAD-HEAD}}" ]]
|
2013-02-09 01:33:48 +00:00
|
|
|
then
|
2013-04-29 15:24:24 +00:00
|
|
|
php ../maintenance/makeStaticLoader.php --fixdir --section=head --ve-path=../modules/ $*
|
2010-01-05 22:27:55 +00:00
|
|
|
elif [[ "$l" == "{{VE-LOAD-BODY}}" ]]
|
|
|
|
then
|
2013-04-29 15:24:24 +00:00
|
|
|
php ../maintenance/makeStaticLoader.php --fixdir --section=body --ve-path=../modules/ $*
|
2013-02-09 01:33:48 +00:00
|
|
|
else
|
|
|
|
echo "$l"
|
|
|
|
fi
|
|
|
|
done
|
|
|
|
) < eg-iframe.tpl | php > eg-iframe.html
|
|
|
|
|
2013-08-27 17:57:21 +00:00
|
|
|
# allow custom path to jsduck, or custom version (eg JSDUCK=jsduck _4.10.4_)
|
|
|
|
JSDUCK=${JSDUCK:-jsduck}
|
|
|
|
|
|
|
|
# Support jsduck 4.x and 5.x
|
|
|
|
jsduckver="$($JSDUCK --version | sed -e 's/[.].*//')"
|
|
|
|
if [ "$jsduckver" = "JSDuck 4" ]; then
|
|
|
|
jsduckopt="--meta-tags ../.docs/MetaTags.rb"
|
|
|
|
else
|
|
|
|
jsduckopt="--tags ../.docs/CustomTags.rb"
|
|
|
|
fi
|
|
|
|
|
2013-04-30 18:52:23 +00:00
|
|
|
# Disable parallel processing which seems to be causing problems under Ruby 1.8
|
2013-08-27 17:57:21 +00:00
|
|
|
$JSDUCK --config config.json $jsduckopt --processes 0 --color --warnings-exit-nonzero
|
2013-03-20 16:45:57 +00:00
|
|
|
ec=$?
|
|
|
|
|
2013-02-09 01:33:48 +00:00
|
|
|
rm eg-iframe.html
|
|
|
|
cd - > /dev/null
|
2013-03-20 16:45:57 +00:00
|
|
|
|
2013-03-15 16:25:39 +00:00
|
|
|
# Exit with exit code of jsduck command
|
|
|
|
exit $ec
|