REPO_CHANGES := $(shell git status --porcelain | wc -l) .PHONY: .initialize .initialize: ifneq ($(REPO_CHANGES),0) $(error cannot run with a dirty repo. stash or commit changes.) endif git submodule update --init --recursive .PHONY: .local .local: mkdir -p stow/duplicity/.config/duplicity cp --update=none local/duplicity-config stow/duplicity/.config/duplicity/config cp --update=none local/duplicity-excludes stow/duplicity/.config/duplicity/excludes cp --update=none local/gitconfig-local stow/git/.config/git/config-local cp --update=none local/local.zsh stow/zsh/.config/zsh/00-local.zsh .PHONY: console console: .initialize .local stow --adopt --dir=stow --target=${HOME} console-utils stow --adopt --dir=stow --target=${HOME} dircolors stow --adopt --dir=stow --target=${HOME} git stow --adopt --dir=stow --target=${HOME} vim stow --adopt --dir=stow --target=${HOME} zsh stow --adopt --dir=stow --target=${HOME} duplicity restore: git restore .