From ca17d69e4a80c3993690a0e02b3252247fb8ebfa Mon Sep 17 00:00:00 2001 From: Ivan Malison Date: Mon, 25 Aug 2014 22:46:00 -0700 Subject: [PATCH] Added brew for multiple users. --- dotfiles/lib/shellrc/functions.sh | 2 +- web_start.sh | 8 ++++++++ 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/dotfiles/lib/shellrc/functions.sh b/dotfiles/lib/shellrc/functions.sh index 142e5213..f03467fe 100644 --- a/dotfiles/lib/shellrc/functions.sh +++ b/dotfiles/lib/shellrc/functions.sh @@ -228,7 +228,7 @@ function ss() { } function git_config_string() { - git config -f $1 --list | xargs -I kv sh -c "echo "\'kv\'"" + git config -f $1 --list | xargs -I kv sh -c "echo \\\"kv\\\"" | xargs | tr '\n' ' ' } function brew_for_multiple_user() { diff --git a/web_start.sh b/web_start.sh index ffd05581..ba9e00cb 100755 --- a/web_start.sh +++ b/web_start.sh @@ -5,6 +5,13 @@ function debian() { sudo apt-get -y install git } +function brew_for_multiple_users() { + sudo chgrp -R admin /usr/local + sudo chmod -R g+w /usr/local + sudo chgrp -R admin /Library/Caches/Homebrew + sudo chmod -R g+w /Library/Caches/Homebrew +} + function osx() { hash gcc &>/dev/null if [ $? -ne 0 ] @@ -13,6 +20,7 @@ function osx() { exit fi hash brew &>/dev/null && echo "brew found" || ruby -e "$(curl -fsSL https://raw.github.com/Homebrew/homebrew/go/install)" + brew_for_multiple_users brew update brew install git }