Rebuild

Development environment bootstrap automation toolkit for OSX

What's this?

rebuild allows you to achieve mouse-free command line tools installation in OSX Yosemite.
And rebuild clones your GitHub repository and runs all of your bootstrap scripts.

You can setup or synchronize your environment by executing rebuild [username]/[repository].

Installation

$ gem install rebuild

Usage

Clean-installed bootstrap

# For example: rebuild k0kubun/dotfiles
$ rebuild [username]/[repository]

No need to touch your mouse. Rebuild will click buttons for you in command line tools installation. Just typing the command allows you to reproduce your development environment.

Your repository will be available at ~/[repository].

Sync multiple environments

# force update repository by `-f`
$ rebuild -f k0kubun/dotfiles

If you manage your development environment on GitHub repository, you can use this gem to synchronize multiple environments.

install.sh runner

# It will run:
# https://raw.githubusercontent.com/[username]/dotfiles/master/install.sh"
$ rebuild [username]

If you have dotfiles repository and install.sh in the root, you can execute it with a simple command.

Options

# By default, git pull is not executed.
# If you want to synchronize repository before running scripts, add -f.
$ rebuild -f

# Repository will be cloned to ~/src/github.com/k0kubun/dotfiles
$ rebuild -d ~/src/github.com/k0kubun/dotfiles

# Run ~/dotfiles/script/*.sh instead of ~/dotfiles/*.sh
$ rebuild -s script

# You can choose which script to run first by shell pipeline
rebuild <<-EOS
  first.sh
  second.sh
EOS

Config

You can skip choosing option by ~/.gitconfig

# ~/.gitconfig
# You can append config template by `rebuild config`

[rebuild]
  # if true, everytime git pull
  update = false

  # you can change script run directory
  scriptdir = script

  # if present, you can `rebuild` without argument
  repo = k0kubun/dotfiles

  # cloned directory path
  directory = ~/src/github.com/k0kubun/dotfiles

  # selected scripts are executed primarily in this order
  dependency = brew.sh ruby.sh

Supported OS

  • 10.10 Yosemite
  • 10.9 Maverics

Prior to 10.8 Mountain Lion, features except command line tools installation are still supported.

License

MIT License