2020-03-09 16:40:48 -05:00
|
|
|
#!/bin/bash
|
|
|
|
# update nuxt
|
2020-03-09 17:46:10 -05:00
|
|
|
|
2020-03-09 18:19:47 -05:00
|
|
|
GUIDEBOOK="target/guidebook"
|
2020-03-09 17:46:10 -05:00
|
|
|
|
2020-03-09 18:19:47 -05:00
|
|
|
if [ ! -f "target/nb.jar" ]
|
2020-03-09 16:40:48 -05:00
|
|
|
then
|
2020-03-09 18:19:47 -05:00
|
|
|
printf "You should not run this unless you have target/nb.jar\n"
|
2020-03-09 17:46:10 -05:00
|
|
|
exit 6
|
2020-03-09 16:40:48 -05:00
|
|
|
fi
|
|
|
|
|
2020-03-09 18:19:47 -05:00
|
|
|
if [ ! -d "target/guidebook" ]
|
2020-03-09 17:46:10 -05:00
|
|
|
then
|
|
|
|
|
2020-03-09 18:19:47 -05:00
|
|
|
pushd ../docsys/src/main/node/docsys
|
2020-03-09 17:46:10 -05:00
|
|
|
if ! ./update.sh $@
|
|
|
|
then
|
|
|
|
printf "Unable to update the guidebook static app\n"
|
|
|
|
exit 2;
|
|
|
|
fi
|
|
|
|
popd
|
|
|
|
|
2020-03-09 18:19:47 -05:00
|
|
|
cp -R ../docsys/src/main/resources/docsys-guidebook/ target/guidebook/
|
2020-03-09 17:46:10 -05:00
|
|
|
else
|
2020-03-09 18:19:47 -05:00
|
|
|
printf "target/guidebook exists, not building again until mvn clean\n"
|
2020-03-09 17:46:10 -05:00
|
|
|
fi
|
|
|
|
|
|
|
|
JAVA=$(which java)
|
|
|
|
JAVA=${JAVA:-$JAVA_HOME/bin/java}
|
|
|
|
|
|
|
|
if [ ! -x "$JAVA" ]
|
|
|
|
then
|
|
|
|
printf "Java was not found in the path and JAVA_HOME is not set\n"
|
|
|
|
exit 5
|
|
|
|
fi
|
2020-03-09 16:40:48 -05:00
|
|
|
|
2020-03-09 18:19:47 -05:00
|
|
|
$JAVA -jar target/nb.jar docserver generate target/guidebook
|
2020-03-09 16:40:48 -05:00
|
|
|
|
2020-03-09 17:46:10 -05:00
|
|
|
#JAVA_HOME=${JAVA_HOME:-JAVA_HOME must be specified if java isn not in the path}
|
|
|
|
#
|
|
|
|
## static site for gh pages
|
|
|
|
#java -jar nb/target/nb.jar docserver generate target/guidebook
|