diff options
author | Tom Ryder <tom@sanctum.geek.nz> | 2020-05-12 22:07:00 +1200 |
---|---|---|
committer | Tom Ryder <tom@sanctum.geek.nz> | 2020-05-12 22:07:00 +1200 |
commit | 1cbf90a0938ecb184b8abb4f5039ece2afbbaf5a (patch) | |
tree | 981dbf9f1a5c218020b53591c5ffd0621cec8433 /Makefile | |
parent | Use short hostname in tmux status (diff) | |
download | dotfiles-1cbf90a0938ecb184b8abb4f5039ece2afbbaf5a.tar.gz dotfiles-1cbf90a0938ecb184b8abb4f5039ece2afbbaf5a.zip |
Use XDG basedirs for Git config
Diffstat (limited to 'Makefile')
-rw-r--r-- | Makefile | 20 |
1 files changed, 11 insertions, 9 deletions
@@ -280,7 +280,7 @@ GIT_TEMPLATE_HOOKS = git/template/hooks/post-update \ git/template/hooks/pre-commit \ git/template/hooks/prepare-commit-msg -all: $(BINS) git/gitconfig less/less $(GIT_TEMPLATE_HOOKS) +all: $(BINS) git/config less/less $(GIT_TEMPLATE_HOOKS) clean distclean: rm -f -- \ @@ -291,8 +291,8 @@ clean distclean: $(GIT_TEMPLATE_HOOKS) \ dillo/dillorc \ dillo/dillorc.m4 \ - git/gitconfig \ - git/gitconfig.m4 \ + git/config \ + git/config.m4 \ include/mktd.m4 \ less/less \ urxvt/ext/select \ @@ -341,13 +341,14 @@ dillo/dillorc: dillo/dillorc.m4 -D HOME=$(HOME) \ dillo/dillorc.m4 > $@ -git/gitconfig: git/gitconfig.m4 +git/config: git/config.m4 m4 \ -D NAME=$(NAME) \ -D EMAIL=$(EMAIL) \ -D KEY=$(KEY) \ -D SENDMAIL=$(SENDMAIL) \ - git/gitconfig.m4 > $@ + -D XDG_CONFIG_HOME=$(XDG_CONFIG_HOME) \ + git/config.m4 > $@ less/less: less/lesskey lesskey --output $@ less/lesskey @@ -428,14 +429,15 @@ install-games-man: mkdir -p -- $(XDG_DATA_HOME)/man/man6 cp -p -- man/man6/*.6df $(XDG_DATA_HOME)/man/man6 -install-git: git/gitconfig $(GIT_TEMPLATE_HOOKS) - cp -p -- git/gitconfig $(HOME)/.gitconfig +install-git: git/config $(GIT_TEMPLATE_HOOKS) + mkdir -p -- $(XDG_CONFIG_HOME)/git + cp -p -- git/config $(XDG_CONFIG_HOME)/git/config find git/template \ -type d -exec sh -c 'mkdir -p -- \ - $(HOME)/.git-template"$${1#git/template}"' \ + $(XDG_CONFIG_HOME)/git/template"$${1#git/template}"' \ _ {} \; \ -o ! -name '*.*' -exec sh -c 'cp -p -- "$$1" \ - $(HOME)/.git-template"$${1#git/template}"' \ + $(XDG_CONFIG_HOME)/git/template"$${1#git/template}"' \ _ {} \; install-gnupg: |