From 4f6e80b96fd0b0ff17f83521c5b6fd7a44c0521f Mon Sep 17 00:00:00 2001 From: Simon Ruderich Date: Mon, 16 Feb 2009 14:42:57 +0100 Subject: [PATCH] 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`. --- .gitignore | 2 ++ Makefile | 3 +++ gitconfig => gitconfig.m4 | 2 +- 3 files changed, 6 insertions(+), 1 deletion(-) create mode 100644 .gitignore rename gitconfig => gitconfig.m4 (78%) 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 -- 2.45.2