Files
portal-webapp/scripts/build-docs.sh
T
2018-07-07 20:43:51 -05:00

45 lines
698 B
Bash

# !/bin/bash
. portal-env.sh
cd $PORTAL_HOME
declare -a arr=("portal_client" "portal_common" "portal_database" "portal_migration" "portal_webapp")
echo Deleting old content
echo Deleting old web content
rm -rf web
echo Deleting old site content
rm -rf target/site
for i in "${arr[@]}"
do
echo Deleting $i old site content
rm -rf $i/target/site
done
if [ ! -d "web" ]; then
mkdir web
fi
for i in "${arr[@]}"
do
if [ ! -d web/$i ]; then
echo "Creating directory web/$i"
mkdir web/$i
fi
done
echo Creating javadocs
mvn site
echo Moving documents to web
mv target/site/* web/.
for i in "${arr[@]}"
do
echo Moving $i to web/$i
mv $i/target/site/* web/$i/.
done
echo Done