diff --git a/install/c++ b/install/c++ new file mode 100755 index 00000000..c415ebcb --- /dev/null +++ b/install/c++ @@ -0,0 +1,21 @@ +#!/usr/bin/env zsh + +source ~/.dotfiles/zsh/functions + +BASEDIR=$(dirname "$0") + +echo_g "==> C++: Making sure prereqs are installed (cmake + git)" + +pkg_install cmake +is_mac && pkg_install git +is_deb && pkg_install git-core + +while [ $# -gt 0 ]; do + case "$1" in + "--sfml") $BASEDIR/cpp/sfml ;; + "--artemis") $BASEDIR/cpp/artemis ;; + esac + shift +done + +echo_g "==> C++: All done!" diff --git a/install/cpp/artemis b/install/cpp/artemis new file mode 100755 index 00000000..4ebc4cc4 --- /dev/null +++ b/install/cpp/artemis @@ -0,0 +1,34 @@ +#!/usr/bin/env zsh + +if is_mac; then + + keep_alive + + if [ ! -d "/usr/local/include/Artemis" ]; then + echo_g "==> C++/Artemis: Attempting to compile ArtemisCpp" + if git clone https://github.com/vinova/Artemis-Cpp.git ~/.artcpp; then + cd ~/.artcpp + mkdir build + cd build + cmake .. + make + sudo make install + rm -rf ~/.artcpp + echo_g "==> C++/Artemis: Done!" + else + echo_r "==> C++/Artemis: Something went wrong installing ArtemisCpp" + RETVAL=3 + fi + else + echo_r "==> C++/Artemis: Artemis is already installed" + RETVAL=2 + fi + +elif is_deb; then + + echo_r "==> C++/Artemis: Install script for linux not finished!" + RETVAL=1 + +fi + +exit $RETVAL diff --git a/install/cpp/sfml b/install/cpp/sfml new file mode 100755 index 00000000..435636fd --- /dev/null +++ b/install/cpp/sfml @@ -0,0 +1,42 @@ +#!/usr/bin/env zsh + +RETVAL=0 + +if is_mac; then + + keep_alive + + # Get SFML 2.1 + if [ ! -d /Library/Frameworks/SFML.framework ]; then + echo_g "==> C++/SFML: Installing SFML 2.1" + + mkdir ~/.temp-sfml + cd ~/.temp-sfml + + SFML="SFML-2.1-osx-gcc-universal.tar.gz" + + # wget http://www.sfml-dev.org/download/sfml/2.1/SFML-2.1-osx-clang-universal.tar.gz + if wget http://www.sfml-dev.org/download/sfml/2.1/$SFML; then + tar -xvf $SFML + cd $SFML + sudo ./install.sh + rm -rf ~/.temp-sfml + + echo_g "==> C++/SFML: Done!" + else + echo_r "==> C++/SFML: Something went wrong downloading SFML 2.1" + RETVAL=3 + fi + else + echo_r "==> C++/SFML: SFML 2.1 is already installed" + RETVAL=2 + fi + +elif is_deb; then + + echo_r "==> C++/SFML: Install script for linux is incomplete!" + RETVAL=1 + +fi + +exit $RETVAL diff --git a/install/mac b/install/mac index d096c069..92d1ecbd 100755 --- a/install/mac +++ b/install/mac @@ -1,23 +1,19 @@ #!/bin/sh -function app_exists { - [ -e /Applications/"$1".app ] || [ -e ~/Applications/"$1".app ] -} - source ~/.dotfiles/zsh/functions if ! is_mac; then - echo_r "==> Aborting. This isn't a mac!" + echo_r "==> Mac: Aborting. This isn't a mac!" exit 1 fi if [ ! -d /usr/local/Cellar ]; then - echo_g "==> Installing homebrew" + echo_g "==> Mac: Installing homebrew" ruby -e "$(curl -fsSL https://raw.github.com/mxcl/homebrew/go)" - echo_g "Done! Don't forget to install the Command Line Tools in XCode" + echo_g "==> Mac: Done! Don't forget to install the Command Line Tools in XCode" else - echo_g "==> Installing all brews and apps" + echo_g "==> Mac: Installing basic brews" brew tap homebrew/dupes brew install wget curl git @@ -29,27 +25,13 @@ else brew tap phinze/homebrew-cask brew install brew-cask - # Install the apps I find useful (that I don't get through the app store) - ! app_exists "LaunchBar" && brew cask install launch-bar - ! app_exists "Dropbox" && brew cask install dropbox - ! app_exists "Google Chrome" && brew cask install google-chrome - ! app_exists "Adium" && brew cask install adium - ! app_exists "AppCleaner" && brew cask install app-cleaner - ! app_exists "CodeKit" && brew cask install codekit - ! app_exists "iTerm" && brew cask install iterm2 - ! app_exists "Reggy" && brew cask install reggy - ! app_exists "NetNewsWire" && brew cask install net-news-wire - ! app_exists "Soulver" && brew cask install soulver - ! app_exists "Scrivener" && brew cask install scrivener - ! app_exists "Sequel Pro" && brew cask install sequel-pro - ! app_exists "Skype" && brew cask install skype - ! app_exists "Transmission" && brew cask install transmission - ! app_exists "Transmit" && brew cask install transmit - ! app_exists "VLC" && brew cask install vlc + while [ $# -gt 0 ]; do + case "$1" in + "--essentials") $BASEDIR/macapps/essentials ;; + "--home") $BASEDIR/macapps/home ;; + esac + shift + done - # I get Sparrow though the app store - #app_exists "Sparrow" && brew cask install sparrow + echo_g "==> Mac: Done!" fi - -# Clean up -unset .f app_exists diff --git a/install/macapps/essentials b/install/macapps/essentials new file mode 100755 index 00000000..231fcfab --- /dev/null +++ b/install/macapps/essentials @@ -0,0 +1,16 @@ +#!/usr/bin/zsh + +echo-g "==> macapps/Essentials: Installing (you might have to run this more than once)..." + +# Install the apps I find essential for every mac I'm on +# (that I don't get through the app store) +! app_exists "LaunchBar" && brew cask install launch-bar +! app_exists "Dropbox" && brew cask install dropbox +! app_exists "Google Chrome" && brew cask install google-chrome +! app_exists "AppCleaner" && brew cask install app-cleaner +! app_exists "iTerm" && brew cask install iterm2 +! app_exists "Sequel Pro" && brew cask install sequel-pro +! app_exists "Transmission" && brew cask install transmission +! app_exists "Transmit" && brew cask install transmit + +echo-g "==> macapps/Essentials: Done!" diff --git a/install/macapps/home b/install/macapps/home new file mode 100755 index 00000000..ad2efa78 --- /dev/null +++ b/install/macapps/home @@ -0,0 +1,15 @@ +#!/usr/bin/env zsh + +echo-g "==> macapps/Home: Installing (you might have to run this more than once)..." + +! app_exists "Adium" && brew cask install adium +! app_exists "CodeKit" && brew cask install codekit +! app_exists "Reggy" && brew cask install reggy +! app_exists "NetNewsWire" && brew cask install net-news-wire +! app_exists "Soulver" && brew cask install soulver +! app_exists "Scrivener" && brew cask install scrivener +! app_exists "Skype" && brew cask install skype +! app_exists "Vagrant" && brew cask install vagrant +! app_exists "VLC" && brew cask install vlc + +echo-g "==> macapps/Home: Done!" diff --git a/install/py b/install/py deleted file mode 100755 index 54b63d7a..00000000 --- a/install/py +++ /dev/null @@ -1,19 +0,0 @@ -#!/usr/bin/env zsh - -if ! pkg_exists python; then - pkg_install python -fi - -source ~/.dotfiles/zsh/lib/util -keep_alive - -echo_g "==> Installing plugins" -sudo easy_install pip -sudo easy_install cython -sudo pip install PyOpenGL PyOpenGL_accelerate - -# Install sfml -source ~/.dotfiles/install/sfml - -# Install v1.3 tag because there are bugs in 1.4 atm -pip install git+git://github.com/Sonkun/python-sfml.git@v1.3 diff --git a/install/py/opengl b/install/py/opengl new file mode 100755 index 00000000..8c05e7b5 --- /dev/null +++ b/install/py/opengl @@ -0,0 +1,9 @@ +#!/usr/bin/env zsh + +keep_alive + +echo_g "==> Py/OpenGL: Installing PyOpenGL" + +sudo pip install PyOpenGL PyOpenGL_accelerate + +echo_g "==> Py/OpenGL: Done!" diff --git a/install/py/sfml b/install/py/sfml new file mode 100755 index 00000000..82e0ef19 --- /dev/null +++ b/install/py/sfml @@ -0,0 +1,8 @@ +#!/usr/bin/env zsh + +echo_g "==> Py/SFML: Installing PySFML v1.3" + +# Install v1.3 tag because there are bugs in 1.4 atm +pip install git+git://github.com/Sonkun/python-sfml.git@v1.3 + +echo_g "==> Py/SFML: Done!" diff --git a/install/python b/install/python new file mode 100755 index 00000000..0f26affd --- /dev/null +++ b/install/python @@ -0,0 +1,20 @@ +#!/usr/bin/env zsh + +keep_alive + +echo_g "==> Python: Trying to install Python" +pkg_install python + +echo_g "==> Python: Installing plugins" +sudo easy_install pip +sudo easy_install cython + +while [ $# -gt 0 ]; do + case "$1" in + "--opengl") $BASEDIR/py/opengl ;; + "--sfml") $BASEDIR/py/sfml ;; + esac + shift +done + +echo_g "==> Python: Done!" diff --git a/install/sfml b/install/sfml deleted file mode 100755 index 89e12a86..00000000 --- a/install/sfml +++ /dev/null @@ -1,32 +0,0 @@ -#!/usr/bin/env zsh - -if is_mac; then - - keep_alive - - # Get SFML 2.1 - if [ ! -d /Library/Frameworks/SFML.framework ]; then - echo_g "==> Installing SFML 2.1" - - mkdir ~/.temp-sfml - cd ~/.temp-sfml - - SFML="SFML-2.1-osx-gcc-universal.tar.gz" - - # wget http://www.sfml-dev.org/download/sfml/2.1/SFML-2.1-osx-clang-universal.tar.gz - wget http://www.sfml-dev.org/download/sfml/2.1/$SFML - tar -xvf $SFML - cd $SFML - sudo ./install.sh - rm -rf ~/.temp-sfml - - sudo pip install git+git://github.com/Sonkun/python-sfml.git@v1.3 - else - echo_r "==> SFML 2.1 already installed" - fi - -elif is_deb; then - - echo_r "==> SFML install script for linux is incomplete!" - -fi diff --git a/install/vagrant b/install/vagrant new file mode 100755 index 00000000..31d27aa5 --- /dev/null +++ b/install/vagrant @@ -0,0 +1,3 @@ +#!/usr/bin/env zsh + +app_exists "Vagrant" && brew cask install vagrant