Skip to content

Commit

Permalink
OSX is almost done, just plain configurations left
Browse files Browse the repository at this point in the history
  • Loading branch information
isa committed Jan 29, 2012
1 parent 8a40b3c commit 3452571
Show file tree
Hide file tree
Showing 5 changed files with 114 additions and 32 deletions.
5 changes: 0 additions & 5 deletions README

This file was deleted.

42 changes: 42 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
# Environments

Alright, this is my environment setup. Anyone is welcome to steal the logic I used.

I actually tried many alternative solutions (puppet, chef, babushka, cdist) to setup my new machines, but so far none of them worked the way I want. First of all, all of these solutions have dependencies (they require ruby, python3, etc). None of them are actually using the system built-ins like (bash and powershell). Plus they work best on only one platform. Well, if I'm going to spend that much time writing scripts for each environment, why not rolling my own solution.

Here we go.. One side note here is, I'm not planning to solve everyone's problem here. Will be solving my own. Anybody who has similar problems can copy/use this.

## Installation

For Ubuntu and OSX you can use the **boot.sh** and for Windows you should use **boot.ps1**. There are of course some pre-conditions for your machines. I'll explain why in a bit. But these are something you have to do anyways. Just follow the instructions for each platform.

### OSX

**Pre-condition**: Well you have to install XCode before moving on unfortunatelly. Sorry folks, nothing I can do about it since Apple moved XCode into the AppStore.

Current setup does following:

1. Installs and updates **HomeBrew**
2. Installs following packages with brew:
* git
* ack
* rlwrap
* unrar
* virtualhost.sh
* macvim
* python3
* groovy
* mercurial
* fantom
3. After finishing all, it starts installing my minimum required apps:
* Google Chrome
* LaunchBar
* iTerm2
* Speed Download Lite
4. After above packages are installed, it tries to setup the user's home directory by:
* Download and configure my [**Vim**vironment](http://github.com/isa/vim-vironment)
* Creates all the symbolic links necessary to work with anything (.profile, .git-config, .hgrc, etc)

### Ubuntu

Coming soon..
31 changes: 24 additions & 7 deletions osx/boot.sh
Original file line number Diff line number Diff line change
Expand Up @@ -5,15 +5,32 @@ source $HOME/.environments/osx/functions.sh
message "$INFO Booting system for the first time for ${BLUE}OSX"
message "$INFO First things first, we need to install ${MAGENTA}HomeBrew"

# require "homebrew"
# brew update
require "homebrew"
brew update

# package installations
# require "git;git|ack;ack|rlwrap;rlwrap|unrar;unrar"
# require "virtualhost.sh;virtualhost.sh|macvim;mvim"
# require "python3;python3|groovy;groovy|mercurial;hg"

# setup_user
require "git;git|ack;ack|rlwrap;rlwrap|unrar;unrar"
require "virtualhost.sh;virtualhost.sh|macvim;mvim"
require "python3;python3|groovy;groovy|mercurial;hg"
require "fantom;fansh|tree;tree|wget;wget"

# install mac apps
require "Google Chrome" "https://dl.google.com/chrome/mac/stable/CHFA/googlechrome.dmg"
require "LaunchBar" "http://www.obdev.at/downloads/launchbar/LaunchBar-5.1.3.dmg"
require "Speed Download Lite" "http://mirror.nscocoa.com/~yazsoftc1/files/sdl/sdl.zip"
require "iTerm2" "http://iterm2.googlecode.com/files/iTerm2-1_0_0_20120123.zip"

# and finally
setup_user


# don't forget
# apply iTerm settings
# download pckeyboardhack, keyremap4macbook

# keyboard speed
# tap to click
# touchpad speed
# desktop background
# desktop icon size
# dock magnification, dock size, minimize to app
38 changes: 33 additions & 5 deletions osx/functions.sh
Original file line number Diff line number Diff line change
Expand Up @@ -21,16 +21,24 @@ function homebrew() {
if [[ $exists != *brew ]]; then
message "$PROGRESS Well, seems like you've already installed. ${GREEN}"
else
message "$PROGRESS installing {"
message "$PROGRESS installing.."
ruby -e "`curl -fsSL https://raw.github.com/gist/323731`"
message "$PROGRESS }"
message "$PROGRESS done. ${GREEN}"
fi
}

function copy_app_from_image() {
yes | hdiutil attach app.dmg -mountpoint /Volumes/app > /dev/null
app=`find /Volumes/app -name *.app -prune 2>/dev/null | head -1`
cp -R "$app" /Applications/
hdiutil detach /Volumes/app > /dev/null
}

# installing required app
# if it is homebrew, it's a special installation
# if it is pipe delimited, then each parameter has to be brew-package-name;executable-name-after-installation format
# if it is dmg, then it is plain copy
# sorry for the long method, but bash has limited function capabilities
function require() {
if [[ $1 == "homebrew" ]]; then
homebrew
Expand All @@ -42,9 +50,29 @@ function require() {
curl --silent "$2" -o app.dmg

message "$PROGRESS installing.."
hdiutil attach app.dmg -mountpoint /Volumes/app > /dev/null
cp -R "`find /Volumes/app -name *.app -prune`" /Applications/
hdiutil detach /Volumes/app > /dev/null
copy_app_from_image

rm -rf $HOME/.temp
message "$PROGRESS done. ${GREEN}"
elif [[ $2 == *zip ]]; then
message "$INFO Installing ${MAGENTA}$1"
mkdir -p $HOME/.temp && cd $HOME/.temp

message "$PROGRESS downloading.."
curl --silent "$2" -o app.zip

message "$PROGRESS installing.."
unzip app.zip > /dev/null
app=`find . -name *.app -prune 2>/dev/null`

if [[ $app == *app ]]; then
cp -R "$app" /Applications/
else
mv *.dmg app.dmg
copy_app_from_image
fi

message "$PROGRESS done. ${GREEN}"
rm -rf $HOME/.temp
else
IFS="|"
Expand Down
30 changes: 15 additions & 15 deletions osx/pastel.itermcolors
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,9 @@
<key>Ansi 1 Color</key>
<dict>
<key>Blue Component</key>
<real>0.23876098718676564</real>
<real>0.23876099288463593</real>
<key>Green Component</key>
<real>0.34524468859119894</real>
<real>0.34524467587471008</real>
<key>Red Component</key>
<real>1</real>
</dict>
Expand All @@ -32,11 +32,11 @@
<key>Ansi 11 Color</key>
<dict>
<key>Blue Component</key>
<real>0.79964911937713623</real>
<real>0.37049141807496488</real>
<key>Green Component</key>
<real>1</real>
<key>Red Component</key>
<real>1</real>
<real>0.95341599952695066</real>
</dict>
<key>Ansi 12 Color</key>
<dict>
Expand All @@ -61,9 +61,9 @@
<key>Blue Component</key>
<real>0.99703967571258545</real>
<key>Green Component</key>
<real>0.87631028890609741</real>
<real>0.89864421000159811</real>
<key>Red Component</key>
<real>0.87591361999511719</real>
<real>0.79856088927123081</real>
</dict>
<key>Ansi 15 Color</key>
<dict>
Expand All @@ -86,9 +86,9 @@
<key>Ansi 3 Color</key>
<dict>
<key>Blue Component</key>
<real>0.7137255072593689</real>
<real>0.22921030722034752</real>
<key>Green Component</key>
<real>1</real>
<real>0.97548751402128631</real>
<key>Red Component</key>
<real>1</real>
</dict>
Expand All @@ -104,9 +104,9 @@
<key>Ansi 5 Color</key>
<dict>
<key>Blue Component</key>
<real>0.72962275001348176</real>
<real>0.72962272167205811</real>
<key>Green Component</key>
<real>0.28640266584600382</real>
<real>0.28640267252922058</real>
<key>Red Component</key>
<real>1</real>
</dict>
Expand All @@ -115,9 +115,9 @@
<key>Blue Component</key>
<real>0.99607837200164795</real>
<key>Green Component</key>
<real>0.77254897356033325</real>
<real>0.87392531694475006</real>
<key>Red Component</key>
<real>0.7764706015586853</real>
<real>0.73204491978427955</real>
</dict>
<key>Ansi 7 Color</key>
<dict>
Expand Down Expand Up @@ -149,11 +149,11 @@
<key>Background Color</key>
<dict>
<key>Blue Component</key>
<real>0.081589366515837147</real>
<real>0.081589363515377045</real>
<key>Green Component</key>
<real>0.081589366515837147</real>
<real>0.081589363515377045</real>
<key>Red Component</key>
<real>0.081589366515837147</real>
<real>0.081589363515377045</real>
</dict>
<key>Bold Color</key>
<dict>
Expand Down

0 comments on commit 3452571

Please sign in to comment.