Skip to content

An installer script for Homebrew, other system dependencies, and important configuration files

Notifications You must be signed in to change notification settings

jarrodldavis/dotfiles

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

84 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

dotfiles

An installer script for Homebrew, other system dependencies, and important configuration files

Prerequisites

  • A UNIX-ish operating system, one of:
  • dash or other POSIX-compatible shell (/bin/sh)
  • Bash (for Homebrew installation)
  • Zsh (for additional installation scripts)
  • curl (for automatic bootstrapping)
  • git (for manual installation)

sh, Bash, Zsh, and curl are pre-installed on macOS.

Install

The installer script installs Homebrew, clones this repository to ~/.dotfiles, links important configuration files ("dotfiles") into their respective locations, and installs additional system dependencies using Homebrew Bundle.

Automatic Boostrapping

Run the following command to download and execute the bootstrap script.

/bin/sh -c "$(curl -fsSL https://github.com/jarrodldavis/dotfiles/raw/main/install.sh)"

Manual Installation

You can manually clone this repository and run the install.sh script from that repository.

git clone https://github.com/jarrodldavis/dotfiles.git ~/.dotfiles
cd ~/.dotfiles
./install.sh

Alternatively, you can copy the contents of install.sh to a file on disk and run it using sh ./install.sh.

Important

The installer script always clones this repository to ~/.dotfiles, even if it was manually cloned to a different location.

Options

All installer options are specified as environment variables. Unless otherwise specified, the presence of an environment variable with a non-empty value enables the corresponding option; the option is disabled otherwise.

DOTFILES_REINSTALL=1 DOTFILES_SKIP_MAS=1 ./install.sh

Warning

The installer script only checks for any non-empty value in an environment variable, so even typically "falsy" values like 0 or NO will enable the option.

DOTFILES_REINSTALL

Force the removal and reinstallation of Homebrew and all Homebrew Formulae.

Homebrew Casks are not fully removed, but will be adopted or overwritten upon reinstallation. Visual Studio Code extensions will not be removed, but any missing extensions will be reinstalled.

DOTFILES_SKIP_MAS

On macOS, skip installation of Mac App Store (mas) dependencies.

Maintenance

Note

These maintenance actions are performed automatically on macOS before each commit using a git pre-commit hook.

Homebrew

Homebrew Bundle is used to record the CLI tools (Homebrew Formulae), GUI applications (Homebrew Casks), and Visual Studio Code extensions that should be installed. To record the installation or removal of these system dependencies, update configs/Brewfile using ~/.dotfiles/scripts/update-homebrew-bundle.sh.

Global .gitignore

configs/gitignore can be updated to use the latest templates from github/gitignore using ~/.dotfiles/scripts/update-global-gitignore.sh.