Skip to content

Commit

Permalink
totvs utils
Browse files Browse the repository at this point in the history
  • Loading branch information
caarlos0 committed Nov 21, 2012
1 parent 8871c7a commit 72974ce
Show file tree
Hide file tree
Showing 3 changed files with 75 additions and 2 deletions.
1 change: 0 additions & 1 deletion .gitignore
@@ -1,7 +1,6 @@
locals.zsh
log/.zsh_history
projects.zsh
custom/*
!custom/example
!custom/example.zsh
*.swp
Expand Down
74 changes: 74 additions & 0 deletions custom/totvs.zsh
@@ -0,0 +1,74 @@
#
# Just some utilities for use in ecm development.
#

setopt rmstarsilent

HOME="/home/carlos"

This comment has been minimized.

Copy link
@Wayneoween

Wayneoween Nov 26, 2012

This is probably not the best idea here for a default value, or am I missing something?

This comment has been minimized.

Copy link
@caarlos0

caarlos0 Nov 26, 2012

Author Contributor

the whole file should not be here.. sorry for that. I already pull-request the fix. For now, you can just remove this file.

This comment has been minimized.

Copy link
@Wayneoween

Wayneoween Nov 26, 2012

Oh okay, that clears things up! Thanks for the fast response 馃憤

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
}


2 changes: 1 addition & 1 deletion plugins/mvn/mvn.plugin.zsh
Expand Up @@ -37,7 +37,7 @@ mvn-color()
}

# Override the mvn command with the colorized one.
alias mvn="mvn-color"
#alias mvn="mvn-color"

# aliases
alias mvncie='mvn clean install eclipse:eclipse'
Expand Down

0 comments on commit 72974ce

Please sign in to comment.