From d2c517b7fd658300eddd8c4e3bfe9a40f37c6aba Mon Sep 17 00:00:00 2001 From: Artem Sapegin Date: Fri, 12 Oct 2012 18:53:55 +0400 Subject: [PATCH] Some setup stuff. --- bash_profile | 4 +++- setup/Readme.md | 14 +++++++++++++- setup/bash.sh | 6 ++++++ setup/brew.sh | 30 ++++++++++++++++++++++++++++++ setup/imgo.sh | 10 ++++++++++ 5 files changed, 62 insertions(+), 2 deletions(-) create mode 100644 setup/bash.sh create mode 100755 setup/brew.sh create mode 100644 setup/imgo.sh diff --git a/bash_profile b/bash_profile index b7653d2..7b2c0e1 100644 --- a/bash_profile +++ b/bash_profile @@ -30,8 +30,10 @@ done export LC_ALL=en_US.UTF-8 export LANG="en_US" -# Add `~/bin` to the `$PATH` +# Add ~/bin to the $PATH export PATH="$HOME/bin:/usr/local/bin:$PATH" +# Add brew coreutils to $PATH +command -v brew >/dev/null 2>&1 && export PATH="$(brew --prefix coreutils)/libexec/gnubin:$PATH" # If possible, add tab completion for many commands [ -f /etc/bash_completion ] && source /etc/bash_completion diff --git a/setup/Readme.md b/setup/Readme.md index 82ce730..4bc63c3 100644 --- a/setup/Readme.md +++ b/setup/Readme.md @@ -1,7 +1,19 @@ +## Prerequisites + +* [Command Line Tools for Xcode](https://developer.apple.com/downloads) +* [homebrew](http://mxcl.github.com/homebrew/) +* [node.js](http://nodejs.org/) + + ### How to remove US English keyboard layout on Mac OS X -Useful when you use some kind of [typo layout](http://ilyabirman.ru/projects/typography-layout/). +Useful when you use some kind of [typography layout](http://ilyabirman.ru/projects/typography-layout/). ```bash bash <(curl -fsSkL raw.github.com/bolknote/shellgames/master/us_layout_remover.sh) ``` + + +### Misc + +* [OSX Python developer guide](https://gist.github.com/902296) \ No newline at end of file diff --git a/setup/bash.sh b/setup/bash.sh new file mode 100644 index 0000000..92e27f6 --- /dev/null +++ b/setup/bash.sh @@ -0,0 +1,6 @@ +#!/bin/bash +# Installs Bash 4 and registers it as a default shell + +brew install bash +grep '/usr/local/bin/bash' /etc/shells >/dev/null 2>&1 && sudo bash -c "echo /usr/local/bin/bash >> /etc/shells" +chsh -s /usr/local/bin/bash $USER \ No newline at end of file diff --git a/setup/brew.sh b/setup/brew.sh new file mode 100755 index 0000000..8f81d52 --- /dev/null +++ b/setup/brew.sh @@ -0,0 +1,30 @@ +#!/bin/bash +# Based on https://github.com/mathiasbynens/dotfiles/blob/master/.brew + +# Make sure we’re using the latest Homebrew +brew update + +# Upgrade any already-installed formulae +brew upgrade + +# Install GNU core utilities (those that come with OS X are outdated) +brew install coreutils +# Install GNU `find`, `locate`, `updatedb`, and `xargs`, g-prefixed +brew install findutils + +# Install wget with IRI support +#brew install wget --enable-iri + +# Install more recent versions of some OS X tools +brew tap homebrew/dupes +brew install homebrew/dupes/grep +#brew tap josegonzalez/homebrew-php +#brew install php54 + +# Install everything else +brew install git +brew install git-extras +#brew install node + +# Remove outdated versions from the cellar +brew cleanup \ No newline at end of file diff --git a/setup/imgo.sh b/setup/imgo.sh new file mode 100644 index 0000000..f723f4e --- /dev/null +++ b/setup/imgo.sh @@ -0,0 +1,10 @@ +#!/bin/bash +# https://github.com/imgo/imgo + +brew install exiftool imagemagick optipng libjpeg gifsicle + +formulas='pngout.rb defluff.rb cryopng.rb imgo.rb' +for package in $formulas +do + brew install "https://raw.github.com/imgo/imgo-tools/master/Formula/"$package +done