diff --git a/.gitignore b/.gitignore index 9067dcb6..9d6e5df3 100644 --- a/.gitignore +++ b/.gitignore @@ -1,2 +1,3 @@ -setup.log .DS_Store +.idea +*.iml diff --git a/.pairs b/.pairs index e50521a4..aa9b78be 100644 --- a/.pairs +++ b/.pairs @@ -1,6 +1,7 @@ pairs: bk: Brian Kelly; bkelly ah: Ashraf Hanafy; ahanafy + jf: Joshua Franklin; jfranklin email: prefix: pair diff --git a/README.md b/README.md index 6cbf33c9..e9f5cf97 100644 --- a/README.md +++ b/README.md @@ -15,7 +15,22 @@ Then open up the OS X Terminal and run the following commands: $ cd workspace $ git clone https://github.com/pivotal/workstation-setup.git $ cd workstation-setup -$ ./scripts/setup.sh +``` + +### Engineering Machine + +If you're setting up an engineering machine run the following: + +```sh +$ ./engineer.sh +``` + +### Designer Machine + +If you're setting up an engineering machine run the following: + +```sh +$ ./designer.sh ``` ## Having problems? @@ -24,7 +39,7 @@ If you're having problems using the setup script, please let us know by [opening ## Customizing -If you'd like to customize this project for your own use: +If you'd like to customize this project for a project's use: - Fork the project - Edit `./scripts/setup.sh` to your liking diff --git a/designer.sh b/designer.sh new file mode 100755 index 00000000..851b8905 --- /dev/null +++ b/designer.sh @@ -0,0 +1,8 @@ +#!/usr/bin/env bash + +# Fail immediately if any errors occur +set -e + +SCRIPTS_DIR="$(dirname "$0")/scripts" + +${SCRIPTS_DIR}/setup.sh designer diff --git a/engineer.sh b/engineer.sh new file mode 100755 index 00000000..c8f47d69 --- /dev/null +++ b/engineer.sh @@ -0,0 +1,9 @@ +#!/usr/bin/env bash + +# Fail immediately if any errors occur +set -e + +SCRIPTS_DIR="$(dirname "$0")/scripts" + +${SCRIPTS_DIR}/setup.sh engineer + diff --git a/scripts/applications.sh b/scripts/applications-common.sh similarity index 80% rename from scripts/applications.sh rename to scripts/applications-common.sh index 060b37d1..f52c7c48 100755 --- a/scripts/applications.sh +++ b/scripts/applications-common.sh @@ -21,6 +21,7 @@ brew cask install firefox brew cask install slack brew cask install screenhero +brew cask install skype # Text Editors @@ -29,9 +30,6 @@ brew cask install sublime brew cask install textmate brew install macvim -# Design Tools - -brew cask install adobe-creative-cloud -brew cask install sketch -brew cask install recordit +# Emulation tools +brew cask install virtualbox diff --git a/scripts/applications-designer.sh b/scripts/applications-designer.sh new file mode 100755 index 00000000..e87b0973 --- /dev/null +++ b/scripts/applications-designer.sh @@ -0,0 +1,15 @@ +echo +echo "Installing Designer applications" + +# Graphic editing tools + +brew cask install adobe-creative-cloud +brew cask install sketch + +# Screen recording tools + +brew cask install recordit +brew cask install skitch +brew cask install licecap +brew cask install screenflow + diff --git a/scripts/cloud.sh b/scripts/cloud.sh index a9229fa2..9804a21b 100755 --- a/scripts/cloud.sh +++ b/scripts/cloud.sh @@ -1,4 +1,4 @@ echo -echo "Installing Cloud Foundry Command-line Inteface" +echo "Installing Cloud Foundry Command-line Interface" brew tap cloudfoundry/tap brew install cf-cli diff --git a/scripts/configurations.sh b/scripts/configurations.sh index dcf95cdb..219a59af 100755 --- a/scripts/configurations.sh +++ b/scripts/configurations.sh @@ -1,5 +1,5 @@ echo -echo "Configuring iterm" +echo "Configuring iTerm" cp files/com.googlecode.iterm2.plist ~/Library/Preferences echo diff --git a/scripts/finished.sh b/scripts/finished.sh new file mode 100755 index 00000000..dec959b8 --- /dev/null +++ b/scripts/finished.sh @@ -0,0 +1,9 @@ +echo +echo "Done!" + +echo +echo "After checking the above output for any problems, start a new iTerm session to make use of all the tools that have been installed." +echo "Additionally, the results of this setup have been stored in setup.log for review." + +echo + diff --git a/scripts/homebrew.sh b/scripts/homebrew.sh index 63eda33e..72f6b06f 100755 --- a/scripts/homebrew.sh +++ b/scripts/homebrew.sh @@ -12,11 +12,11 @@ echo "Ensuring you have the latest Homebrew..." brew update echo -echo "Ensuring you have a healthy Homebrew enviroment..." +echo "Ensuring you have a healthy Homebrew environment..." brew doctor echo -echo "Ensuring your Homebrew directory is writeable..." +echo "Ensuring your Homebrew directory is writable..." sudo chown -R $(whoami) /usr/local/bin echo @@ -28,6 +28,9 @@ echo "Adding Pivotal Tab to Homebrew" brew tap pivotal/tap echo +echo "Upgrading existing brews..." +brew upgrade + echo "Cleaning up your Homebrew installation..." brew cleanup diff --git a/scripts/setup.sh b/scripts/setup.sh index 514c2fac..ea6a534b 100755 --- a/scripts/setup.sh +++ b/scripts/setup.sh @@ -3,37 +3,34 @@ # Fail immediately if any errors occur set -e -setup_dir="$(dirname "$0")" +SETUP_TYPE=$1 +MY_DIR="$(dirname "$0")" clear echo -echo "You need to agree to the Xcode Software License Agreement" -echo "You will need to enter your password first." -echo "Then, when the agree comes up, press 'q' to jump to the end and then type 'agree' and press return" -echo +echo "Setting up a '$SETUP_TYPE' machine..." -sudo xcodebuild -license +${MY_DIR}/xcode-license.sh # Note: Homebrew needs to be set up first -$setup_dir/homebrew.sh -$setup_dir/configuration-osx.sh -$setup_dir/configuration-bash.sh -$setup_dir/git.sh -$setup_dir/java.sh -$setup_dir/ruby.sh -$setup_dir/node.sh -$setup_dir/node-packages.sh -$setup_dir/cloud.sh -$setup_dir/applications.sh -$setup_dir/configurations.sh - -echo -echo "Done!" - -echo -echo "After checking the above output for any problems, start a new iTerm session to make use of all the tools that have been installed." -echo "Additionally, the results of this setup have been stored in setup.log for review." - -echo +${MY_DIR}/homebrew.sh +${MY_DIR}/configuration-osx.sh +${MY_DIR}/configuration-bash.sh +${MY_DIR}/git.sh +${MY_DIR}/java.sh +${MY_DIR}/ruby.sh +${MY_DIR}/node.sh +${MY_DIR}/node-packages.sh +${MY_DIR}/cloud.sh +${MY_DIR}/applications-common.sh + +if [ "$SETUP_TYPE" -eq "designer" ] +then + ${MY_DIR}/applications-designer.sh +fi + +${MY_DIR}/configurations.sh + +${MY_DIR}/finished.sh diff --git a/scripts/teardown.sh b/scripts/teardown.sh index f793ae0f..31e595a5 100755 --- a/scripts/teardown.sh +++ b/scripts/teardown.sh @@ -6,7 +6,7 @@ set -e clear echo -echo "Ensuring your Homebrew directory is writeable..." +echo "Ensuring your Homebrew directory is writable..." sudo chown -R $(whoami) /usr/local/bin brew prune diff --git a/scripts/xcode-license.sh b/scripts/xcode-license.sh new file mode 100755 index 00000000..60a07cde --- /dev/null +++ b/scripts/xcode-license.sh @@ -0,0 +1,7 @@ +echo +echo "You need to agree to the Xcode Software License Agreement" +echo "You will need to enter your password first." +echo "Then, when the agree comes up, press 'q' to jump to the end and then type 'agree' and press return" +echo + +sudo xcodebuild -license