diff options
| author | Colin Walters <walters@verbum.org> | 2010-07-08 13:42:02 -0400 |
|---|---|---|
| committer | Colin Walters <walters@verbum.org> | 2010-07-08 13:42:02 -0400 |
| commit | 09c46a49094cdc77c36780841ee9db99c7241e29 (patch) | |
| tree | ccf939e68410412182eaaff2a17f4bdfe3789a31 /Makefile | |
| parent | f2d32eba386e567e948b64bc35f4c4a589522503 (diff) | |
| download | homegit-MOVED-TO-GNOME-09c46a49094cdc77c36780841ee9db99c7241e29.tar.gz homegit-MOVED-TO-GNOME-09c46a49094cdc77c36780841ee9db99c7241e29.tar.xz homegit-MOVED-TO-GNOME-09c46a49094cdc77c36780841ee9db99c7241e29.zip | |
Split up install phase
Diffstat (limited to 'Makefile')
| -rw-r--r-- | Makefile | 19 |
1 files changed, 15 insertions, 4 deletions
@@ -1,12 +1,23 @@ all: -install: +# We won't nuke people's dotfiles by default +install: install-bin + +install-bin: mkdir -p $$HOME/bin 2>/dev/null for f in bin/*; do \ bn=$$(basename $$f); \ ln -sf $$(pwd)/bin/$$bn ~/bin; \ done - for f in dotfiles/*; do \ - bn=$$(basename $$f); \ - ln -sf $$(pwd)/dotfiles/$$bn ~/.$$bn; \ + +install-dotfiles: + @for f in dotfiles/*; do \ + bn=$$(basename $$f); target=$$HOME/.$$bn; \ + if test -f $$target -a '!' -L $$target; then \ + echo "error: $$target exists; remove it to opt-in to installation, then"; \ + echo " rerun make install-dotfiles"; \ + else \ + echo "Installing $$target"; \ + ln -sf $$(pwd)/dotfiles/$$bn $$target; \ + fi; \ done |
