aboutsummaryrefslogtreecommitdiff
path: root/Makefile
diff options
context:
space:
mode:
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile28
1 files changed, 28 insertions, 0 deletions
diff --git a/Makefile b/Makefile
new file mode 100644
index 0000000..bbdaf73
--- /dev/null
+++ b/Makefile
@@ -0,0 +1,28 @@
+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 .