Last active
December 15, 2017 06:01
-
-
Save heyseus1/5a5e80bd79ca82728c808a8ca07a94e7 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
setjdk() { | |
if [ $# -ne 0 ]; then | |
removeFromPath '/System/Library/Frameworks/JavaVM.framework/Home/bin' | |
if [ -n "${JAVA_HOME+x}" ]; then | |
removeFromPath $JAVA_HOME | |
fi | |
export JAVA_HOME=`/usr/libexec/java_home -v $@` | |
export PATH=$JAVA_HOME/bin:$PATH | |
fi | |
} | |
removeFromPath() { | |
export PATH=$(echo $PATH | sed -E -e "s;:$1;;" -e "s;$1:?;;") | |
} | |
install_deps () | |
{ | |
add-apt-repository ppa:webupd8team/java | |
apt-get update | |
apt-get -y upgrade | |
apt-get -y install \ | |
virtualbox vagrant subversion oracle-java7-installer oracle-java7-set-default | |
apt-get update | |
} | |
deploy_git () | |
{ | |
git clone https://github.com/rv-kip/vagrant-ubuntu-tomcat7 java_dev | |
cd java_dev | |
git submodule init | |
git submodule update | |
svn co https://svn.kqed.org/webapi/trunk/ webapi | |
svn co https://svn.kqed.org/kqed-org/trunk/ kqed-new | |
svn co https://svn.kqed.org/calreport/branches/rel-2 calreport | |
svn co https://svn.kqed.org/simplecms/branches/java7-migration/ simplecms | |
} | |
deploy_vagrant () | |
{ | |
vagrant box add precise64 http://files.vagrantup.com/precise64.box | |
vagrant up | |
vagrant global-status | |
} | |
install_deps | |
setjdk | |
deploy_git | |
deploy_vagrant |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment