Skip to content

Commit

Permalink
feat(app): Add Xcode check and TeamViewer
Browse files Browse the repository at this point in the history
Fixes #25
  • Loading branch information
Ijmir committed Feb 15, 2015
1 parent 85ef75a commit 5cab06e
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 7 deletions.
24 changes: 18 additions & 6 deletions install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,7 @@ inquirer_software() {
"Slack" "Slack" on
"Spectacle" "Spectacle" on
"SublimeText3" "Sublime Text 3" on
"TeamViewer" "TeamViewer" on
"VirtualBox" "Virtual Box" on
"Bower" "Bower" on
"Browserify" "browserify" on
Expand All @@ -91,6 +92,15 @@ inquirer_software() {
}

clear
############ Xcode ############
if [ "$TRAVIS" != "true" ]; then
xcodeVersion=`xcodebuild -version | grep Xcode | cut -d' ' -f2 | cut -d'.' -f1`

This comment has been minimized.

Copy link
@jskrzypek

jskrzypek Feb 16, 2015

Contributor

failure scenario where xcodebuild fails

maybe run xcode-select -p first and look for return value of 2 or 0, on success (i.e. returns 0) xcodebuild exists

http://stackoverflow.com/questions/15371925/how-to-check-if-command-line-tools-is-installed

maybe do instead:

if xcodeVersion=`xcodebuild -version ...`; then
    if [[ xcodeVersion -lt 6 ]]; then
        #update xcode
    fi
else
    #install xcode
fi
if [ "$xcodeVersion" -lt "6" ]; then
echo_color "Your Xcode version is lower than 6. Please install the latest Xcode version from the App Store." $color_red
exit
fi
fi
############ Xcode ############

############ ZSH ############
echo_title "BEGIN INSTALLING ZSH"
Expand Down Expand Up @@ -143,21 +153,23 @@ inquirer_software
############ SOFTWARE ############
echo_title "BEGIN INSTALLING SOFTWARE"
if ( ! which tree >/dev/null); then
brew install tree;
brew install tree
fi
if ( ! which wget >/dev/null); then
brew install wget;
brew install wget
fi
if ( ! which imagemagick >/dev/null); then
brew install imagemagick;
brew install imagemagick
fi
if ( ! which git >/dev/null); then
brew install git;
brew install git
fi
if ( ! which python >/dev/null); then
brew install python;
brew install python
fi

if ([[ $choice == *"all"* ]] || [[ $choice == "TeamViewer" ]]); then
brew cask install teamviewer --force

This comment has been minimized.

Copy link
@jskrzypek

jskrzypek Feb 16, 2015

Contributor

need indent

fi
if ([[ $choice == *"all"* ]] || [[ $choice == "Spectacle" ]]); then
brew cask install spectacle --force
fi
Expand Down
3 changes: 2 additions & 1 deletion test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -58,9 +58,10 @@ check_file "$app_folder/VirtualBox.app" # check VirtualBox software
check_file "$app_folder/Slack.app" # check Slack software
check_file "$app_folder/Google Chrome.app" # check Google Chrome software
check_file "$app_folder/LimeChat.app" # check Lime Chat software
check_file "$app_folder/TeamViewer.app" # check Team Viewer software

check_file "$(which npm)" "npm"
check_file "$(which jshint)" "jsint"
check_file "$(which jshint)" "jshint"
check_file "$(which eslint)" "eslint"
check_file "$(which jscs)" "jscs"
check_file "$(which gulp)" "gulp"
Expand Down

0 comments on commit 5cab06e

Please sign in to comment.