Skip to content

Instantly share code, notes, and snippets.

@jsmestad
Forked from atmos/init.sh
Created May 21, 2010 05:41

Revisions

  1. @atmos atmos revised this gist May 21, 2010. 1 changed file with 1 addition and 1 deletion.
    2 changes: 1 addition & 1 deletion init.sh
    Original file line number Diff line number Diff line change
    @@ -2,7 +2,7 @@
    curl http://gist.github.com/raw/323731/install_homebrew > install_homebrew.rb
    ruby install_homebrew.rb
    rm install_homebrew.rb
    echo "PATH=/usr/local/bin:\$PATH" >> ~/.profile
    echo "PATH=/usr/local/bin:/Developer/usr/bin:\$PATH; export PATH" >> ~/.profile
    source ~/.profile

    echo "Your path is now $PATH"
  2. @atmos atmos revised this gist May 21, 2010. 1 changed file with 2 additions and 2 deletions.
    4 changes: 2 additions & 2 deletions init.sh
    Original file line number Diff line number Diff line change
    @@ -22,8 +22,8 @@ else
    fi

    # installing postgres
    brew install postgresql
    if [[ "$?" -eq "0" ]]; then
    brew install postgresql
    POSTGRESQL_VERSION=`brew list postgresql | awk -F/ '{print $6}' | head -n 1`
    initdb /usr/local/var/postgres
    launchctl load -w /usr/local/Cellar/postgresql/$POSTGRESQL_VERSION/org.postgresql.postgres.plist
    @@ -33,8 +33,8 @@ else
    fi

    # install mongo
    brew install mongo
    if [[ "$?" -eq "0" ]]; then
    brew install mongo
    MONGODB_VERSION=`brew list mongodb | awk -F/ '{print $6}' | head -n 1`
    cp /usr/local/Cellar/mongodb/$MONGODB_VERSION/org.mongodb.mongod.plist ~/Library/LaunchAgents
    launchctl load -w ~/Library/LaunchAgents/org.mongodb.mongod.plist
  3. @atmos atmos revised this gist May 20, 2010. 1 changed file with 32 additions and 11 deletions.
    43 changes: 32 additions & 11 deletions init.sh
    Original file line number Diff line number Diff line change
    @@ -11,20 +11,37 @@ brew update

    # installing mysql
    brew install mysql
    /usr/local/Cellar/mysql/5.1.46/bin/mysql_install_db
    cp /usr/local/Cellar/mysql/5.1.46/com.mysql.mysqld.plist ~/Library/LaunchAgents
    launchctl load -w ~/Library/LaunchAgents/com.mysql.mysqld.plist
    # ps auwwx | grep my
    if [[ "$?" -eq "0" ]]; then
    MYSQL_VERSION=`brew list mysql | awk -F/ '{print $6}' | head -n1`
    /usr/local/Cellar/mysql/$MYSQL_VERSION/bin/mysql_install_db
    cp /usr/local/Cellar/mysql/$MYSQL_VERSION/com.mysql.mysqld.plist ~/Library/LaunchAgents
    launchctl load -w ~/Library/LaunchAgents/com.mysql.mysqld.plist
    else
    echo "Unable to install mysql, weak"
    exit 1
    fi

    # installing postgres
    brew install postgresql
    initdb /usr/local/var/postgres
    launchctl load -w /usr/local/Cellar/postgresql/8.4.3/org.postgresql.postgres.plist
    if [[ "$?" -eq "0" ]]; then
    brew install postgresql
    POSTGRESQL_VERSION=`brew list postgresql | awk -F/ '{print $6}' | head -n 1`
    initdb /usr/local/var/postgres
    launchctl load -w /usr/local/Cellar/postgresql/$POSTGRESQL_VERSION/org.postgresql.postgres.plist
    else
    echo "Unable to install postgresql, weak"
    exit 1
    fi

    # install mongo
    brew install mongo
    cp /usr/local/Cellar/mongodb/1.4.2-x86_64/org.mongodb.mongod.plist ~/Library/LaunchAgents
    launchctl load -w ~/Library/LaunchAgents/org.mongodb.mongod.plist
    if [[ "$?" -eq "0" ]]; then
    brew install mongo
    MONGODB_VERSION=`brew list mongodb | awk -F/ '{print $6}' | head -n 1`
    cp /usr/local/Cellar/mongodb/$MONGODB_VERSION/org.mongodb.mongod.plist ~/Library/LaunchAgents
    launchctl load -w ~/Library/LaunchAgents/org.mongodb.mongod.plist
    else
    echo "Unable to install mongodb, weak"
    exit 1
    fi

    # install a bunch of utils
    for i in node rlwrap kiwi ack sqlite hub wget; do
    @@ -48,7 +65,11 @@ git clone git://github.com/atmos/hancock.git
    cd hancock/
    bundle install
    bundle exec rake

    if [[ "$?" -eq "0" ]]; then
    echo "Successfully bootstrapped your machine"
    else
    echo "Shit failed. :("
    fi
    #wget http://github.com/robbyrussell/oh-my-zsh/raw/master/tools/install.sh -O - | sh
    #cat ~/.profile >> ~/.zshrc
    #rm ~/.profile
  4. @atmos atmos revised this gist May 20, 2010. 2 changed files with 54 additions and 44 deletions.
    54 changes: 54 additions & 0 deletions init.sh
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,54 @@
    #!/bin/sh
    curl http://gist.github.com/raw/323731/install_homebrew > install_homebrew.rb
    ruby install_homebrew.rb
    rm install_homebrew.rb
    echo "PATH=/usr/local/bin:\$PATH" >> ~/.profile
    source ~/.profile

    echo "Your path is now $PATH"
    brew install git
    brew update

    # installing mysql
    brew install mysql
    /usr/local/Cellar/mysql/5.1.46/bin/mysql_install_db
    cp /usr/local/Cellar/mysql/5.1.46/com.mysql.mysqld.plist ~/Library/LaunchAgents
    launchctl load -w ~/Library/LaunchAgents/com.mysql.mysqld.plist
    # ps auwwx | grep my

    # installing postgres
    brew install postgresql
    initdb /usr/local/var/postgres
    launchctl load -w /usr/local/Cellar/postgresql/8.4.3/org.postgresql.postgres.plist

    # install mongo
    brew install mongo
    cp /usr/local/Cellar/mongodb/1.4.2-x86_64/org.mongodb.mongod.plist ~/Library/LaunchAgents
    launchctl load -w ~/Library/LaunchAgents/org.mongodb.mongod.plist

    # install a bunch of utils
    for i in node rlwrap kiwi ack sqlite hub wget; do
    brew install $i
    done

    # install rvm for ease of use
    sudo gem install rvm
    rvm-install
    echo "if [[ -s /Users/$USER/.rvm/scripts/rvm ]] ; then source /Users/$USER/.rvm/scripts/rvm ; fi" >> ~/.profile
    source ~/.profile

    # setup the default 1.8.7 version
    rvm install 1.8.7-p173
    rvm use 1.8.7-p173
    echo "rvm use 1.8.7-p173" >> ~/.profile

    # install bundler
    gem install bundler
    git clone git://github.com/atmos/hancock.git
    cd hancock/
    bundle install
    bundle exec rake

    #wget http://github.com/robbyrussell/oh-my-zsh/raw/master/tools/install.sh -O - | sh
    #cat ~/.profile >> ~/.zshrc
    #rm ~/.profile
    44 changes: 0 additions & 44 deletions setting_up_with_homebrew
    Original file line number Diff line number Diff line change
    @@ -1,44 +0,0 @@
    % curl http://gist.github.com/raw/323731/install_homebrew > install_homebrew.rb
    % ruby install_homebrew.rb
    % rm install_homebrew.rb
    % echo "PATH=/usr/local/bin:\$PATH" >> ~/.profile
    % source ~/.profile
    % echo $PATH
    % brew install git
    % brew update
    % brew search mysql
    % brew install mysql
    % /usr/local/Cellar/mysql/5.1.45/bin/mysql_install_db
    % cp /usr/local/Cellar/mysql/5.1.45/com.mysql.mysqld.plist ~/Library/LaunchAgents
    % launchctl load -w ~/Library/LaunchAgents/com.mysql.mysqld.plist
    % ps auwwx | grep my
    % brew install postgresql
    % initdb /usr/local/var/postgres
    % launchctl load -w /usr/local/Cellar/postgresql/8.4.3/org.postgresql.postgres.plist
    % ps auwwx | grep post
    % brew install mongo
    % cp /usr/local/Cellar/mongodb/1.4.2-x86_64/org.mongodb.mongod.plist ~/Library/LaunchAgents
    % launchctl load -w ~/Library/LaunchAgents/org.mongodb.mongod.plist
    % brew install node
    % brew install rlwrap
    % brew install kiwi
    % brew install ack
    % brew install sqlite
    % brew install hub
    % brew install wget
    % sudo gem install rvm
    % rvm-install
    % echo "if [[ -s /Users/atmos/.rvm/scripts/rvm ]] ; then source /Users/atmos/.rvm/scripts/rvm ; fi" >> ~/.profile
    % source ~/.profile
    % rvm install 1.8.7-p173
    % rvm use 1.8.7-p173
    % echo "rvm use 1.8.7-p173" >> ~/.profile
    % which gem
    % gem install bundler
    % git clone git://github.com/atmos/hancock.git
    % cd hancock/
    % bundle install
    % bundle exec rake
    % wget http://github.com/robbyrussell/oh-my-zsh/raw/master/tools/install.sh -O - | sh
    % cat ~/.profile >> ~/.zshrc
    % rm ~/.profile
  5. @atmos atmos revised this gist May 12, 2010. 1 changed file with 0 additions and 1 deletion.
    1 change: 0 additions & 1 deletion setting_up_with_homebrew
    Original file line number Diff line number Diff line change
    @@ -31,7 +31,6 @@
    % echo "if [[ -s /Users/atmos/.rvm/scripts/rvm ]] ; then source /Users/atmos/.rvm/scripts/rvm ; fi" >> ~/.profile
    % source ~/.profile
    % rvm install 1.8.7-p173
    % rvm install 1.8.7-p173
    % rvm use 1.8.7-p173
    % echo "rvm use 1.8.7-p173" >> ~/.profile
    % which gem
  6. @atmos atmos revised this gist May 12, 2010. 1 changed file with 1 addition and 0 deletions.
    1 change: 1 addition & 0 deletions setting_up_with_homebrew
    Original file line number Diff line number Diff line change
    @@ -25,6 +25,7 @@
    % brew install ack
    % brew install sqlite
    % brew install hub
    % brew install wget
    % sudo gem install rvm
    % rvm-install
    % echo "if [[ -s /Users/atmos/.rvm/scripts/rvm ]] ; then source /Users/atmos/.rvm/scripts/rvm ; fi" >> ~/.profile
  7. @atmos atmos revised this gist May 12, 2010. 1 changed file with 3 additions and 0 deletions.
    3 changes: 3 additions & 0 deletions setting_up_with_homebrew
    Original file line number Diff line number Diff line change
    @@ -16,6 +16,9 @@
    % initdb /usr/local/var/postgres
    % launchctl load -w /usr/local/Cellar/postgresql/8.4.3/org.postgresql.postgres.plist
    % ps auwwx | grep post
    % brew install mongo
    % cp /usr/local/Cellar/mongodb/1.4.2-x86_64/org.mongodb.mongod.plist ~/Library/LaunchAgents
    % launchctl load -w ~/Library/LaunchAgents/org.mongodb.mongod.plist
    % brew install node
    % brew install rlwrap
    % brew install kiwi
  8. @atmos atmos revised this gist May 12, 2010. 1 changed file with 4 additions and 4 deletions.
    8 changes: 4 additions & 4 deletions setting_up_with_homebrew
    Original file line number Diff line number Diff line change
    @@ -26,10 +26,10 @@
    % rvm-install
    % echo "if [[ -s /Users/atmos/.rvm/scripts/rvm ]] ; then source /Users/atmos/.rvm/scripts/rvm ; fi" >> ~/.profile
    % source ~/.profile
    % rvm install 1.8.7-p137
    % rvm install 1.8.7-p137
    % rvm use 1.8.7-p137
    % echo "rvm use 1.8.7-p137" >> ~/.profile
    % rvm install 1.8.7-p173
    % rvm install 1.8.7-p173
    % rvm use 1.8.7-p173
    % echo "rvm use 1.8.7-p173" >> ~/.profile
    % which gem
    % gem install bundler
    % git clone git://github.com/atmos/hancock.git
  9. @atmos atmos revised this gist May 12, 2010. 1 changed file with 4 additions and 5 deletions.
    9 changes: 4 additions & 5 deletions setting_up_with_homebrew
    Original file line number Diff line number Diff line change
    @@ -26,11 +26,10 @@
    % rvm-install
    % echo "if [[ -s /Users/atmos/.rvm/scripts/rvm ]] ; then source /Users/atmos/.rvm/scripts/rvm ; fi" >> ~/.profile
    % source ~/.profile
    % rvm install 1.8.6-p287
    % vim /Users/atmos/.rvm/src/ruby-1.8.6-p287/ext/openssl/openssl_missing.h # fixup compilation errors on lines 122 and 123
    % rvm install 1.8.6-p287
    % rvm use 1.8.6-p287
    % echo "rvm use 1.8.6-p287" >> ~/.profile
    % rvm install 1.8.7-p137
    % rvm install 1.8.7-p137
    % rvm use 1.8.7-p137
    % echo "rvm use 1.8.7-p137" >> ~/.profile
    % which gem
    % gem install bundler
    % git clone git://github.com/atmos/hancock.git
  10. @atmos atmos revised this gist May 12, 2010. 1 changed file with 1 addition and 1 deletion.
    2 changes: 1 addition & 1 deletion setting_up_with_homebrew
    Original file line number Diff line number Diff line change
    @@ -22,7 +22,7 @@
    % brew install ack
    % brew install sqlite
    % brew install hub
    % gem install rvm
    % sudo gem install rvm
    % rvm-install
    % echo "if [[ -s /Users/atmos/.rvm/scripts/rvm ]] ; then source /Users/atmos/.rvm/scripts/rvm ; fi" >> ~/.profile
    % source ~/.profile
  11. @atmos atmos revised this gist May 12, 2010. 1 changed file with 1 addition and 0 deletions.
    1 change: 1 addition & 0 deletions setting_up_with_homebrew
    Original file line number Diff line number Diff line change
    @@ -17,6 +17,7 @@
    % launchctl load -w /usr/local/Cellar/postgresql/8.4.3/org.postgresql.postgres.plist
    % ps auwwx | grep post
    % brew install node
    % brew install rlwrap
    % brew install kiwi
    % brew install ack
    % brew install sqlite
  12. @atmos atmos revised this gist May 12, 2010. 1 changed file with 1 addition and 1 deletion.
    2 changes: 1 addition & 1 deletion setting_up_with_homebrew
    Original file line number Diff line number Diff line change
    @@ -8,9 +8,9 @@
    % brew update
    % brew search mysql
    % brew install mysql
    % /usr/local/Cellar/mysql/5.1.45/bin/mysql_install_db
    % cp /usr/local/Cellar/mysql/5.1.45/com.mysql.mysqld.plist ~/Library/LaunchAgents
    % launchctl load -w ~/Library/LaunchAgents/com.mysql.mysqld.plist
    % /usr/local/Cellar/mysql/5.1.45/bin/mysql_install_db
    % ps auwwx | grep my
    % brew install postgresql
    % initdb /usr/local/var/postgres
  13. @atmos atmos revised this gist May 12, 2010. 1 changed file with 2 additions and 2 deletions.
    4 changes: 2 additions & 2 deletions setting_up_with_homebrew
    Original file line number Diff line number Diff line change
    @@ -1,11 +1,11 @@
    % curl http://gist.github.com/raw/323731/install_homebrew > install_homebrew
    % curl http://gist.github.com/raw/323731/install_homebrew > install_homebrew.rb
    % ruby install_homebrew.rb
    % rm install_homebrew.rb
    % echo "PATH=/usr/local/bin:\$PATH" >> ~/.profile
    % source ~/.profile
    % echo $PATH
    % brew update
    % brew install git
    % brew update
    % brew search mysql
    % brew install mysql
    % cp /usr/local/Cellar/mysql/5.1.45/com.mysql.mysqld.plist ~/Library/LaunchAgents
  14. @atmos atmos revised this gist Apr 29, 2010. 1 changed file with 1 addition and 1 deletion.
    2 changes: 1 addition & 1 deletion setting_up_with_homebrew
    Original file line number Diff line number Diff line change
    @@ -21,7 +21,7 @@
    % brew install ack
    % brew install sqlite
    % brew install hub
    % sudo gem install rvm
    % gem install rvm
    % rvm-install
    % echo "if [[ -s /Users/atmos/.rvm/scripts/rvm ]] ; then source /Users/atmos/.rvm/scripts/rvm ; fi" >> ~/.profile
    % source ~/.profile
  15. @atmos atmos revised this gist Apr 28, 2010. 1 changed file with 2 additions and 0 deletions.
    2 changes: 2 additions & 0 deletions setting_up_with_homebrew
    Original file line number Diff line number Diff line change
    @@ -37,3 +37,5 @@
    % bundle install
    % bundle exec rake
    % wget http://github.com/robbyrussell/oh-my-zsh/raw/master/tools/install.sh -O - | sh
    % cat ~/.profile >> ~/.zshrc
    % rm ~/.profile
  16. @atmos atmos revised this gist Apr 28, 2010. 1 changed file with 1 addition and 1 deletion.
    2 changes: 1 addition & 1 deletion setting_up_with_homebrew
    Original file line number Diff line number Diff line change
    @@ -1,4 +1,4 @@
    % curl http://gist.github.com/raw/323731/25f99360c7de3f72027d8fd07cb369b1c8756ea6/install_homebrew.rb > install_homebrew.rb
    % curl http://gist.github.com/raw/323731/install_homebrew > install_homebrew
    % ruby install_homebrew.rb
    % rm install_homebrew.rb
    % echo "PATH=/usr/local/bin:\$PATH" >> ~/.profile
  17. @atmos atmos revised this gist Apr 28, 2010. 1 changed file with 0 additions and 1 deletion.
    1 change: 0 additions & 1 deletion setting_up_with_homebrew
    Original file line number Diff line number Diff line change
    @@ -16,7 +16,6 @@
    % initdb /usr/local/var/postgres
    % launchctl load -w /usr/local/Cellar/postgresql/8.4.3/org.postgresql.postgres.plist
    % ps auwwx | grep post
    % brew install rvm
    % brew install node
    % brew install kiwi
    % brew install ack
  18. @atmos atmos revised this gist Apr 28, 2010. 1 changed file with 1 addition and 1 deletion.
    2 changes: 1 addition & 1 deletion setting_up_with_homebrew
    Original file line number Diff line number Diff line change
    @@ -10,7 +10,7 @@
    % brew install mysql
    % cp /usr/local/Cellar/mysql/5.1.45/com.mysql.mysqld.plist ~/Library/LaunchAgents
    % launchctl load -w ~/Library/LaunchAgents/com.mysql.mysqld.plist
    % sudo /usr/local/Cellar/mysql/5.1.45/bin/mysql_install_db
    % /usr/local/Cellar/mysql/5.1.45/bin/mysql_install_db
    % ps auwwx | grep my
    % brew install postgresql
    % initdb /usr/local/var/postgres
  19. @atmos atmos created this gist Apr 28, 2010.
    40 changes: 40 additions & 0 deletions setting_up_with_homebrew
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,40 @@
    % curl http://gist.github.com/raw/323731/25f99360c7de3f72027d8fd07cb369b1c8756ea6/install_homebrew.rb > install_homebrew.rb
    % ruby install_homebrew.rb
    % rm install_homebrew.rb
    % echo "PATH=/usr/local/bin:\$PATH" >> ~/.profile
    % source ~/.profile
    % echo $PATH
    % brew update
    % brew install git
    % brew search mysql
    % brew install mysql
    % cp /usr/local/Cellar/mysql/5.1.45/com.mysql.mysqld.plist ~/Library/LaunchAgents
    % launchctl load -w ~/Library/LaunchAgents/com.mysql.mysqld.plist
    % sudo /usr/local/Cellar/mysql/5.1.45/bin/mysql_install_db
    % ps auwwx | grep my
    % brew install postgresql
    % initdb /usr/local/var/postgres
    % launchctl load -w /usr/local/Cellar/postgresql/8.4.3/org.postgresql.postgres.plist
    % ps auwwx | grep post
    % brew install rvm
    % brew install node
    % brew install kiwi
    % brew install ack
    % brew install sqlite
    % brew install hub
    % sudo gem install rvm
    % rvm-install
    % echo "if [[ -s /Users/atmos/.rvm/scripts/rvm ]] ; then source /Users/atmos/.rvm/scripts/rvm ; fi" >> ~/.profile
    % source ~/.profile
    % rvm install 1.8.6-p287
    % vim /Users/atmos/.rvm/src/ruby-1.8.6-p287/ext/openssl/openssl_missing.h # fixup compilation errors on lines 122 and 123
    % rvm install 1.8.6-p287
    % rvm use 1.8.6-p287
    % echo "rvm use 1.8.6-p287" >> ~/.profile
    % which gem
    % gem install bundler
    % git clone git://github.com/atmos/hancock.git
    % cd hancock/
    % bundle install
    % bundle exec rake
    % wget http://github.com/robbyrussell/oh-my-zsh/raw/master/tools/install.sh -O - | sh