2012-11-21 18:29:09 +01:00
|
|
|
#
|
|
|
|
# Just some utilities for use in ecm development.
|
|
|
|
#
|
|
|
|
|
|
|
|
setopt rmstarsilent
|
|
|
|
|
|
|
|
HOME="/home/carlos"
|
|
|
|
ECM_WS="$HOME/totvs/ws"
|
|
|
|
ECM_JBOSS="$HOME/Public/ecm/JBoss-7.1.1"
|
|
|
|
ECM_PORT="8080"
|
|
|
|
VOLDEMORT=$ECM_WS/voldemort
|
|
|
|
ECM=$ECM_WS/ecm
|
|
|
|
INSTALLER="n"
|
|
|
|
|
|
|
|
# fuckin aliases
|
|
|
|
alias ecmu=ecmup
|
|
|
|
alias ecmb=ecmbuild
|
|
|
|
alias ecmc=ecmclean
|
|
|
|
alias ecms=ecmstart
|
|
|
|
alias ecmo=ecmstop
|
2012-11-21 19:01:28 +01:00
|
|
|
alias ecmi=ecminstall
|
|
|
|
alias ecm=ecmfull
|
2012-11-21 18:29:09 +01:00
|
|
|
|
|
|
|
# update ecm
|
|
|
|
ecmup() {
|
|
|
|
echo "update all the things!"
|
|
|
|
cd $VOLDEMORT && svn up
|
|
|
|
cd $ECM && svn up
|
|
|
|
}
|
|
|
|
|
|
|
|
# build it!
|
|
|
|
ecmbuild() {
|
2012-11-21 19:01:28 +01:00
|
|
|
echo "build? no problem sir..."
|
|
|
|
|
|
|
|
case $@ in
|
|
|
|
-*i*)
|
|
|
|
INSTALLER=y
|
|
|
|
;;
|
|
|
|
esac
|
|
|
|
|
2012-11-21 18:29:09 +01:00
|
|
|
cd $VOLDEMORT && mvncie
|
|
|
|
cd $VOLDEMORT/social-ecm
|
|
|
|
cd $VOLDEMORT/wcm && mvncie
|
|
|
|
cd $ECM/ecm/wecmpackage && mvncie
|
|
|
|
cd $VOLDEMORT/ecm && mvncie
|
2012-11-21 19:01:28 +01:00
|
|
|
ecminstall
|
|
|
|
}
|
|
|
|
|
|
|
|
# gen installer or cp wars...
|
|
|
|
ecminstall() {
|
|
|
|
if [[ "$INSTALLER" == "y" ]]; then
|
2012-11-21 19:20:43 +01:00
|
|
|
echo "generating installer..."
|
|
|
|
cd $VOLDEMORT/ecm/installer
|
2012-11-21 19:01:28 +01:00
|
|
|
mvnci -am -Drun=installer -DLinux64=true -DappServer=jboss
|
|
|
|
else
|
2012-11-21 19:20:43 +01:00
|
|
|
echo "cpying wars..."
|
2012-11-21 19:01:28 +01:00
|
|
|
cd $VOLDEMORT/ecm/build && mvnci
|
2012-11-21 19:20:43 +01:00
|
|
|
cd $VOLDEMORT/wcm/build && mvnci
|
2012-11-21 19:01:28 +01:00
|
|
|
cd $VOLDEMORT/social-ecm/build && mvnci
|
|
|
|
fi
|
2012-11-21 18:29:09 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
# clean jboss trash folders
|
|
|
|
ecmclean() {
|
|
|
|
echo "cleaning jboss shit"
|
|
|
|
rm -rf $ECM_JBOSS/standalone/{deployments/*,log,tmp} 2> /dev/null
|
|
|
|
}
|
|
|
|
|
|
|
|
# start jboss server
|
|
|
|
ecmstart() {
|
2012-11-21 19:01:28 +01:00
|
|
|
# why shall I start server if i just gen a installer?
|
|
|
|
if [[ "$INSTALLER" == "y" ]]; then
|
|
|
|
echo "starting jboss"
|
|
|
|
JAVA_OPTS="-Xmx2048m -XX:MaxPermSize=512m -DzkRun -Dbootstrap_conf=true" $ECM_JBOSS/bin/standalone.sh
|
|
|
|
fi
|
2012-11-21 18:29:09 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
# stop jboss (usually on 8080)
|
|
|
|
ecmstop() {
|
|
|
|
echo "kill jboss (or whatever you are running on 8080"
|
|
|
|
fuser -k $ECM_PORT/tcp
|
|
|
|
}
|
|
|
|
|
|
|
|
# do all the things
|
2012-11-21 19:01:28 +01:00
|
|
|
ecmfull() {
|
2012-11-21 18:29:09 +01:00
|
|
|
echo "serious business here. let's have a coffee.."
|
|
|
|
ecmstop
|
|
|
|
ecmclean
|
2012-11-21 18:35:28 +01:00
|
|
|
ecmup
|
|
|
|
ecmbuild && ecmstart
|
2012-11-21 18:29:09 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
|