setup.sh 733 B

123456789101112131415161718
  1. #!/bin/bash
  2. export JAVA_HOME=/usr/lib/jvm/java-1.7.0-openjdk-amd64
  3. export RESIN_HOME=${IROOT}/resin-4.0.41
  4. export GRAILS_PATH=${IROOT}/grails-2.4.4/bin/
  5. sed -i 's|jdbc:mysql://.*:3306|jdbc:mysql://'"${DBHOST}"':3306|g' hello/grails-app/conf/DataSource.groovy
  6. export PATH=${GRAILS_PATH}:$PATH
  7. export GRAILS_AGENT_CACHE_DIR=${IROOT}/.grails/.slcache
  8. cd hello
  9. grails -Dgrails.work.dir=${IROOT}/.grails -non-interactive -plain-output refresh-dependencies
  10. grails -Dgrails.work.dir=${IROOT}/.grails -non-interactive -plain-output compile
  11. grails -Dgrails.work.dir=${IROOT}/.grails prod -non-interactive -plain-output war
  12. rm -rf $RESIN_HOME/webapps/*
  13. cp target/hello-0.1.war $RESIN_HOME/webapps/grails.war
  14. $RESIN_HOME/bin/resinctl start