2014-01-11 00:05:03 +00:00
|
|
|
#!/usr/bin/env bash
|
|
|
|
|
2014-01-22 00:11:18 +00:00
|
|
|
SCRIPT_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
|
|
|
|
pushd $SCRIPT_DIR > /dev/null
|
2014-01-11 00:05:03 +00:00
|
|
|
jsduck \
|
2014-02-03 23:20:54 +00:00
|
|
|
--config=./jsduck-config.json \
|
|
|
|
-- \
|
|
|
|
`find ../resources/{multilightbox,mmv} -name '*.js'` \
|
2014-02-12 22:18:13 +00:00
|
|
|
2>&1 | tee jsduck.log \
|
|
|
|
&& echo "JSDuck execution finished."
|
2014-02-03 23:20:54 +00:00
|
|
|
RESULT=$?
|
|
|
|
|
2014-02-12 22:18:13 +00:00
|
|
|
if [ $RESULT -eq 0 ]; then
|
|
|
|
grep "^Warning:" jsduck.log > /dev/null
|
|
|
|
GREPPED=$?
|
|
|
|
if [ $GREPPED -eq 0 ]; then
|
|
|
|
RESULT=1
|
|
|
|
fi
|
|
|
|
fi
|
|
|
|
|
2014-01-22 00:11:18 +00:00
|
|
|
popd > /dev/null
|
2014-02-03 23:20:54 +00:00
|
|
|
|
|
|
|
exit $RESULT
|