2016-09-20 09:29:46 +00:00
|
|
|
#!/bin/bash
|
|
|
|
|
2017-04-07 08:05:47 +00:00
|
|
|
TOOL="asciidoctor"
|
|
|
|
|
|
|
|
while getopts "h?auc" opt; do
|
|
|
|
case "$opt" in
|
|
|
|
h|\?)
|
|
|
|
echo "Usage: build-guide.sh [OPTION] [GUIDE]"
|
|
|
|
echo ""
|
|
|
|
echo " -a use asciidoctor (default)"
|
|
|
|
echo " -u use ccutil"
|
|
|
|
echo " -c delete built guides"
|
|
|
|
echo ""
|
|
|
|
echo "If guide is not specified all guides are built. GUIDE should be the directory"
|
|
|
|
echo "name of the specific guide to build."
|
|
|
|
exit 0
|
|
|
|
;;
|
|
|
|
a) TOOL="asciidoctor"
|
|
|
|
;;
|
|
|
|
u) TOOL="ccutil"
|
|
|
|
;;
|
|
|
|
c) TOOL="clean"
|
|
|
|
;;
|
|
|
|
esac
|
|
|
|
done
|
|
|
|
|
|
|
|
shift $((OPTIND-1))
|
|
|
|
[ "$1" = "--" ] && shift
|
|
|
|
|
2017-03-15 12:35:53 +00:00
|
|
|
GUIDE=$1
|
2016-09-20 09:29:46 +00:00
|
|
|
|
2017-04-07 08:05:47 +00:00
|
|
|
function buildGuide
|
|
|
|
{
|
|
|
|
GUIDE=$1
|
|
|
|
CURRENT_DIRECTORY=$(pwd)
|
|
|
|
|
|
|
|
echo "***********************************************************************************************************"
|
|
|
|
echo "$TOOL: $GUIDE"
|
|
|
|
echo ""
|
|
|
|
|
2017-08-28 12:50:14 +00:00
|
|
|
cp /home/st/tmp/keycloak-documentation/$GUIDE/pom.xml $GUIDE/
|
2017-04-07 08:05:47 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
if [ "$GUIDE" = "" ]; then
|
|
|
|
for i in authorization_services getting_started securing_apps server_admin server_development server_installation; do
|
|
|
|
buildGuide $i
|
|
|
|
done
|
|
|
|
else
|
|
|
|
buildGuide $GUIDE
|
|
|
|
fi
|
2017-03-15 12:35:53 +00:00
|
|
|
|
2017-04-07 08:05:47 +00:00
|
|
|
echo "***********************************************************************************************************"
|