Install scripts now update if already installed
This commit is contained in:
parent
c346ed19e8
commit
90bd3775ef
12
README.md
12
README.md
|
@ -1,18 +1,10 @@
|
|||
# Dotfiles of a spaghetti code warrior
|
||||
|
||||
The magicks!
|
||||
My mac dotfiles.
|
||||
|
||||
## Installation
|
||||
### Mac
|
||||
|
||||
./installdeps-mac.sh
|
||||
./osx
|
||||
./brew
|
||||
./rvm
|
||||
|
||||
### Ubuntu
|
||||
|
||||
./installdeps-ubuntu.sh
|
||||
sh <(curl https://raw.github.com/hlissner/dotfiles/master/install.sh -L)
|
||||
|
||||
## And if you want vim...
|
||||
|
||||
|
|
36
bin/update
36
bin/update
|
@ -1,35 +1,9 @@
|
|||
#!/bin/zsh
|
||||
|
||||
# Homebrew #####################
|
||||
echo "\n* Updating homebrew"
|
||||
brew update
|
||||
brew upgrade
|
||||
src=$(cd "$(dirname "$0")"; pwd)
|
||||
|
||||
$src/install/brew
|
||||
$src/install/rvm
|
||||
$src/install/vim
|
||||
|
||||
# RUBY #########################
|
||||
|
||||
# Make sure rvm is sourced properly
|
||||
if [ -f ~/.rvm/scripts/rvm ]; then
|
||||
[[ "$(type rvm)" =~ "function$" ]] || source ~/.rvm/scripts/rvm
|
||||
fi
|
||||
|
||||
# Update all rubies and rubygems
|
||||
for v in 1.9.3 1.8.7; do
|
||||
echo "\n* Updating ruby $v"
|
||||
rvm use $v
|
||||
gem update --system
|
||||
gem update
|
||||
done
|
||||
|
||||
# Update system ruby
|
||||
echo "\n* Updating system ruby"
|
||||
rvm use system
|
||||
sudo gem update --system
|
||||
sudo gem update
|
||||
|
||||
|
||||
# Vim ##########################
|
||||
echo "\n* Updating vim..."
|
||||
vim +BundleInstall! +BundleClean! +q +q
|
||||
|
||||
echo "\nDone!"
|
||||
echo "\nAll done!"
|
||||
|
|
13
install.sh
Normal file
13
install.sh
Normal file
|
@ -0,0 +1,13 @@
|
|||
#!/bin/bash
|
||||
|
||||
src=$(cd "$(dirname "$0")"; pwd)
|
||||
|
||||
$src/install/osx
|
||||
$src/install/zsh
|
||||
$src/install/brew
|
||||
$src/install/git
|
||||
$src/install/rvm
|
||||
|
||||
echo "\nDone!"
|
||||
echo "\nAnd if you want to install vim, run:"
|
||||
echo "\n sh <(curl https://raw.github.com/hlissner/mlvim/master/install.sh -L)"
|
76
install/brew
76
install/brew
|
@ -5,46 +5,46 @@ if [ ! `command -v "brew"` ]; then
|
|||
echo "\n* Installing homebrew"
|
||||
# http://mxcl.github.com/homebrew/
|
||||
ruby <(curl -fsSkL raw.github.com/mxcl/homebrew/go)
|
||||
|
||||
echo "\n* Setting up homebrew"
|
||||
# Install GNU core utilities (those that come with OS X are outdated)
|
||||
brew install coreutils
|
||||
echo "Don’t forget to add $(brew --prefix coreutils)/libexec/gnubin to \$PATH."
|
||||
# Install GNU `find`, `locate`, `updatedb`, and `xargs`, g-prefixed
|
||||
brew install findutils
|
||||
# Install Bash 4
|
||||
brew install bash
|
||||
|
||||
# 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
|
||||
|
||||
# Install everything else
|
||||
brew install ack
|
||||
brew install git
|
||||
brew install rename
|
||||
brew install tree
|
||||
|
||||
# vim
|
||||
brew install python ruby
|
||||
brew install node nginx ctags
|
||||
brew install php54 --with-fpm --with-imap --with-mysql --with-pgsql --without-apache
|
||||
brew install php54-imagick php54-mcrypt php54-xdebug readline
|
||||
brew install php54-intl
|
||||
brew install macvim
|
||||
else
|
||||
echo "\n* Updating homebrew"
|
||||
# Make sure we’re using the latest Homebrew
|
||||
brew update
|
||||
|
||||
# Upgrade any already-installed formulae
|
||||
brew upgrade
|
||||
fi
|
||||
|
||||
echo "\n* Updating homebrew"
|
||||
# Make sure we’re using the latest Homebrew
|
||||
brew update
|
||||
|
||||
# Upgrade any already-installed formulae
|
||||
brew upgrade
|
||||
|
||||
echo "\n* Setting up homebrew"
|
||||
# Install GNU core utilities (those that come with OS X are outdated)
|
||||
brew install coreutils
|
||||
echo "Don’t forget to add $(brew --prefix coreutils)/libexec/gnubin to \$PATH."
|
||||
# Install GNU `find`, `locate`, `updatedb`, and `xargs`, g-prefixed
|
||||
brew install findutils
|
||||
# Install Bash 4
|
||||
brew install bash
|
||||
|
||||
# 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
|
||||
|
||||
# Install everything else
|
||||
brew install ack
|
||||
brew install git
|
||||
brew install rename
|
||||
brew install tree
|
||||
|
||||
# vim
|
||||
brew install python ruby
|
||||
brew install node nginx ctags
|
||||
brew install php54 --with-fpm --with-imap --with-mysql --with-pgsql --without-apache
|
||||
brew install php54-imagick php54-mcrypt php54-xdebug readline
|
||||
brew install php54-intl
|
||||
brew install macvim
|
||||
|
||||
echo "\n* Cleaning up homebrew"
|
||||
# Remove outdated versions from the cellar
|
||||
brew cleanup
|
||||
|
|
59
install/rvm
59
install/rvm
|
@ -3,35 +3,44 @@
|
|||
echo "[RVM]"
|
||||
|
||||
if [ ! `command -v "rvm"` ]; then
|
||||
# If RVM's not installed, install it and the rubies
|
||||
echo "\n* Installing RVM"
|
||||
|
||||
# https://rvm.io
|
||||
curl -L https://get.rvm.io | bash -s stable --ruby
|
||||
|
||||
echo "\n* Install rubies"
|
||||
|
||||
# Install rubies and update rubygems
|
||||
rvm install 1.9.3
|
||||
rvm install 1.8.7-p371
|
||||
|
||||
# But ultimately, the system should be the default
|
||||
rvm --default use system
|
||||
|
||||
# A few prerequisites
|
||||
sudo gem install bluecloth capistrano bundler
|
||||
else
|
||||
# Otherwise, update it
|
||||
|
||||
# Make sure rvm is sourced properly
|
||||
if [ -f ~/.rvm/scripts/rvm ]; then
|
||||
[[ "$(type rvm)" =~ "function$" ]] || source ~/.rvm/scripts/rvm
|
||||
fi
|
||||
|
||||
# Update all rubies and rubygems
|
||||
for v in 1.9.3 1.8.7; do
|
||||
echo "\n* Updating ruby $v"
|
||||
rvm use $v
|
||||
gem update --system
|
||||
gem update
|
||||
done
|
||||
|
||||
# Update system ruby
|
||||
echo "\n* Updating system ruby"
|
||||
rvm use system
|
||||
sudo gem update --system
|
||||
sudo gem update
|
||||
fi
|
||||
|
||||
# Ask for the administrator password upfront
|
||||
sudo -v
|
||||
|
||||
# Keep sudo alive
|
||||
while true; do sudo -n true; sleep 60; kill -0 "$$" || exit; done 2>/dev/null &
|
||||
|
||||
echo "\n* Install rubies"
|
||||
|
||||
# Install rubies and update rubygems
|
||||
rvm install 1.9.3
|
||||
rvm use 1.9.3
|
||||
gem update --system
|
||||
gem update
|
||||
|
||||
rvm install 1.8.7-p371
|
||||
rvm use 1.8.7
|
||||
gem update --system
|
||||
gem update
|
||||
|
||||
# But ultimately, the system should be the default
|
||||
rvm --default use system
|
||||
|
||||
# A few prerequisites
|
||||
gem install bluecloth capistrano bundler
|
||||
|
||||
echo "\nDone!"
|
||||
|
|
19
install/vim
19
install/vim
|
@ -5,10 +5,21 @@ if [ ! `command -v "brew"` ]; then
|
|||
exit
|
||||
fi
|
||||
|
||||
echo "\n* Installing macvim"
|
||||
brew install macvim --with-cscope --override-system-vim
|
||||
if [ ! `command -v "mvim"` ]; then
|
||||
echo "\n* Installing macvim"
|
||||
brew install macvim --with-cscope --override-system-vim
|
||||
fi
|
||||
|
||||
echo "\n* Installing vim rcfiles"
|
||||
sh <(curl https://raw.github.com/hlissner/mlvim/master/install.sh -L)
|
||||
if [ ! -d ~/.vimrc ]; then
|
||||
echo "\n* Installing vim rcfiles"
|
||||
|
||||
if [ -d ~/.vim ]; then
|
||||
rm -rf ~/.vim
|
||||
fi
|
||||
sh <(curl https://raw.github.com/hlissner/mlvim/master/install.sh -L)
|
||||
fi
|
||||
|
||||
echo "\n* Updating vim..."
|
||||
vim +BundleInstall! +BundleClean! +q +q
|
||||
|
||||
echo "\nDone!"
|
||||
|
|
Loading…
Reference in a new issue