From: Simon Ruderich Date: Mon, 16 Feb 2009 13:42:57 +0000 (+0100) Subject: Make gitconfig system independent by using m4. X-Git-Url: https://ruderich.org/simon/gitweb/?a=commitdiff_plain;h=4f6e80b96fd0b0ff17f83521c5b6fd7a44c0521f;p=config%2Fdotfiles.git Make gitconfig system independent by using m4. This replaces HOME with the current home directory. This was necessary as git needs an absolute path for excludesfile. gitconfig.m4 is automatically created when calling `make setup`. --- diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..72db1de --- /dev/null +++ b/.gitignore @@ -0,0 +1,2 @@ +# Ignore generated files. +gitconfig diff --git a/Makefile b/Makefile index 6bae053..6caf0e5 100644 --- a/Makefile +++ b/Makefile @@ -2,9 +2,12 @@ # Generate necessary files and create symbolic links in ~/. +M4=../m4.sh LINK=../link.sh .PHONY: setup setup: + # Generate gitconfig. + $(M4) gitconfig -DHOME=$(HOME) # Link setup. $(LINK) gitconfig ~/.gitconfig $(LINK) gitignore ~/.gitignore diff --git a/gitconfig b/gitconfig.m4 similarity index 78% rename from gitconfig rename to gitconfig.m4 index 7421a25..f2b86b4 100644 --- a/gitconfig +++ b/gitconfig.m4 @@ -6,7 +6,7 @@ diff = auto [core] - excludesfile = /Users/simonruderich/.gitignore + excludesfile = HOME/.gitignore [alias] ci = commit -v