summaryrefslogtreecommitdiff
path: root/custom/totvs.zsh
diff options
context:
space:
mode:
authorCarlos Alexandro Becker <caarlos0@gmail.com>2012-11-21 15:29:09 -0200
committerCarlos Alexandro Becker <caarlos0@gmail.com>2012-11-21 15:29:09 -0200
commit72974ce409277c52eb30461e48f0755916a49f05 (patch)
treef8c37cf69e67c2b3865702ae36f13b54348ecf95 /custom/totvs.zsh
parent8871c7a6d00a7c0a1e586e4f4d7a21c255231783 (diff)
downloadzsh-72974ce409277c52eb30461e48f0755916a49f05.tar.gz
zsh-72974ce409277c52eb30461e48f0755916a49f05.tar.bz2
zsh-72974ce409277c52eb30461e48f0755916a49f05.zip
totvs utils
Diffstat (limited to 'custom/totvs.zsh')
-rw-r--r--custom/totvs.zsh74
1 files changed, 74 insertions, 0 deletions
diff --git a/custom/totvs.zsh b/custom/totvs.zsh
new file mode 100644
index 000000000..9ef5fd641
--- /dev/null
+++ b/custom/totvs.zsh
@@ -0,0 +1,74 @@
+#
+# 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
+alias ecm=goecm
+
+
+# update ecm
+ecmup() {
+ echo "update all the things!"
+ cd $VOLDEMORT && svn up
+ cd $ECM && svn up
+}
+
+# build it!
+ecmbuild() {
+ vared -p 'build? no problem sir, do you want a installer? (y/N) ' INSTALLER
+ cd $VOLDEMORT && mvncie
+ cd $VOLDEMORT/social-ecm
+ cd $VOLDEMORT/wcm && mvncie
+ cd $ECM/ecm/wecmpackage && mvncie
+ cd $VOLDEMORT/ecm && mvncie
+ if [[ $INSTALLER -eq 'n' ]]; then
+ cd $VOLDEMORT/ecm/installer
+ mvnci -am -Drun=installer -DLinux64=true -DappServer=jboss
+ else
+ cd $VOLDEMORT/ecm/build && mvnci
+ cd $VOLDEMORT/social-ecm/build && mvnci
+ fi
+}
+
+# clean jboss trash folders
+ecmclean() {
+ echo "cleaning jboss shit"
+ rm -rf $ECM_JBOSS/standalone/{deployments/*,log,tmp} 2> /dev/null
+}
+
+# start jboss server
+ecmstart() {
+ echo "starting jboss"
+ JAVA_OPTS="-Xmx2048m -XX:MaxPermSize=512m -DzkRun -Dbootstrap_conf=true" $ECM_JBOSS/bin/standalone.sh
+}
+
+# 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
+goecm() {
+ echo "serious business here. let's have a coffee.."
+ ecmstop
+ ecmclean
+ ecmbuild && ecmup && ecmstart
+}
+
+