Last active
August 29, 2015 14:22
-
-
Save lesleh/7b74ee8292df47ee239c to your computer and use it in GitHub Desktop.
This file contains hidden or 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 | |
| cd $HOME | |
| echo Updating system | |
| sudo apt-get update -y | |
| sudo apt-get upgrade -y | |
| sudo apt-get install -y curl | |
| if [ ! -d $HOME/.ssh ]; then | |
| echo Generating a keypair | |
| mkdir $HOME/.ssh | |
| ssh-keygen -b 2048 -t rsa -f $HOME/.ssh/id_rsa -q -N "" | |
| fi | |
| echo Enter your GitHub username: | |
| read GITHUB_USERNAME | |
| echo Enter your GitHub password: | |
| read GITHUB_PASSWORD | |
| echo Adding public key to your GitHub account | |
| curl --user $GITHUB_USERNAME:$GITHUB_PASSWORD https://api.github.com/user/keys \ | |
| --data "{\"title\": \"AUTOADDED KEY\", \"key\": \"$(cat $HOME/.ssh/id_rsa.pub)\"}" | |
| echo Fixing some Ubuntu crap | |
| sudo apt-get purge -y landscape-client-ui-install | |
| sudo apt-get purge -y unity-webapps-common | |
| sudo apt-get install -y unity-tweak-tool | |
| echo RVM stuffs | |
| echo "gem: --no-document" >> ~/.gemrc | |
| gpg --keyserver hkp://keys.gnupg.net --recv-keys 409B6B1796C275462A1703113804BB82D39DC0E3 | |
| \curl -sSL https://get.rvm.io | bash | |
| source /home/leslie/.rvm/scripts/rvm | |
| rvm install ruby | |
| echo "source \$HOME/.rvm/scripts/rvm" >> $HOME/.bashrc | |
| echo "rvm use ruby" >> $HOME/.bashrc | |
| gem install bundler | |
| echo Installing mysql with root password of 'password' | |
| echo mysql-server mysql-server/root_password password password | sudo debconf-set-selections | |
| echo mysql-server mysql-server/root_password_again password password | sudo debconf-set-selections | |
| sudo apt-get install -y mysql-server | |
| echo Installing latest git | |
| sudo apt-add-repository -y ppa:git-core/ppa | |
| sudo apt-get update | |
| sudo apt-get install -y git | |
| echo Installing RGeo | |
| sudo apt-get install -y libgeos-dev | |
| echo Fixing symlinks | |
| GEOS_SO=$(find /usr/lib -maxdepth 1 -name "libgeos-*.so") | |
| sudo ln -s $GEOS_SO /usr/lib/libgeos.so.1 | |
| sudo ln -s /usr/lib/libgeos.so.1 /usr/lib/libgeos.so | |
| echo Cloning projects | |
| mkdir $HOME/active_apps | |
| cd $HOME/active_apps | |
| for REPO in \ | |
| beti_shared \ | |
| iris-shared-model \ | |
| ultrapurewater \ | |
| Sebastian_playground \ | |
| iris \ | |
| desaldata \ | |
| global_water_intel \ | |
| beti \ | |
| desalinationdotcom \ | |
| trackerapp; do | |
| git clone git@github.com:mp/$REPO.git | |
| done | |
| mv iris-shared-model rc-iris-shared-model | |
| cd $HOME |
Author
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Need to fix the Mysql collations to use utf-8 still.