Modularize + clean up install scripts
This commit is contained in:
parent
aa509feae1
commit
c2c9dee09b
21
install/c++
Executable file
21
install/c++
Executable file
|
@ -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!"
|
34
install/cpp/artemis
Executable file
34
install/cpp/artemis
Executable file
|
@ -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
|
42
install/cpp/sfml
Executable file
42
install/cpp/sfml
Executable file
|
@ -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
|
42
install/mac
42
install/mac
|
@ -1,23 +1,19 @@
|
||||||
#!/bin/sh
|
#!/bin/sh
|
||||||
|
|
||||||
function app_exists {
|
|
||||||
[ -e /Applications/"$1".app ] || [ -e ~/Applications/"$1".app ]
|
|
||||||
}
|
|
||||||
|
|
||||||
source ~/.dotfiles/zsh/functions
|
source ~/.dotfiles/zsh/functions
|
||||||
|
|
||||||
if ! is_mac; then
|
if ! is_mac; then
|
||||||
echo_r "==> Aborting. This isn't a mac!"
|
echo_r "==> Mac: Aborting. This isn't a mac!"
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [ ! -d /usr/local/Cellar ]; then
|
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)"
|
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
|
else
|
||||||
echo_g "==> Installing all brews and apps"
|
echo_g "==> Mac: Installing basic brews"
|
||||||
brew tap homebrew/dupes
|
brew tap homebrew/dupes
|
||||||
|
|
||||||
brew install wget curl git
|
brew install wget curl git
|
||||||
|
@ -29,27 +25,13 @@ else
|
||||||
brew tap phinze/homebrew-cask
|
brew tap phinze/homebrew-cask
|
||||||
brew install brew-cask
|
brew install brew-cask
|
||||||
|
|
||||||
# Install the apps I find useful (that I don't get through the app store)
|
while [ $# -gt 0 ]; do
|
||||||
! app_exists "LaunchBar" && brew cask install launch-bar
|
case "$1" in
|
||||||
! app_exists "Dropbox" && brew cask install dropbox
|
"--essentials") $BASEDIR/macapps/essentials ;;
|
||||||
! app_exists "Google Chrome" && brew cask install google-chrome
|
"--home") $BASEDIR/macapps/home ;;
|
||||||
! app_exists "Adium" && brew cask install adium
|
esac
|
||||||
! app_exists "AppCleaner" && brew cask install app-cleaner
|
shift
|
||||||
! app_exists "CodeKit" && brew cask install codekit
|
done
|
||||||
! 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
|
|
||||||
|
|
||||||
# I get Sparrow though the app store
|
echo_g "==> Mac: Done!"
|
||||||
#app_exists "Sparrow" && brew cask install sparrow
|
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# Clean up
|
|
||||||
unset .f app_exists
|
|
||||||
|
|
16
install/macapps/essentials
Executable file
16
install/macapps/essentials
Executable file
|
@ -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!"
|
15
install/macapps/home
Executable file
15
install/macapps/home
Executable file
|
@ -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!"
|
19
install/py
19
install/py
|
@ -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
|
|
9
install/py/opengl
Executable file
9
install/py/opengl
Executable file
|
@ -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!"
|
8
install/py/sfml
Executable file
8
install/py/sfml
Executable file
|
@ -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!"
|
20
install/python
Executable file
20
install/python
Executable file
|
@ -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!"
|
32
install/sfml
32
install/sfml
|
@ -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
|
|
3
install/vagrant
Executable file
3
install/vagrant
Executable file
|
@ -0,0 +1,3 @@
|
||||||
|
#!/usr/bin/env zsh
|
||||||
|
|
||||||
|
app_exists "Vagrant" && brew cask install vagrant
|
Loading…
Reference in a new issue