]> ruderich.org/simon Gitweb - config/dotfiles.git/commitdiff
Make gitconfig system independent by using m4.
authorSimon Ruderich <simon@ruderich.org>
Mon, 16 Feb 2009 13:42:57 +0000 (14:42 +0100)
committerSimon Ruderich <simon@ruderich.org>
Mon, 16 Feb 2009 13:42:57 +0000 (14:42 +0100)
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 [new file with mode: 0644]
Makefile
gitconfig.m4 [moved from gitconfig with 78% similarity]

diff --git a/.gitignore b/.gitignore
new file mode 100644 (file)
index 0000000..72db1de
--- /dev/null
@@ -0,0 +1,2 @@
+# Ignore generated files.
+gitconfig
index 6bae053e4957421a3405b868c2d966ea33cea63c..6caf0e5fc25eab3c3a5aa82c9dff068dcbc8cf6e 100644 (file)
--- 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
similarity index 78%
rename from gitconfig
rename to gitconfig.m4
index 7421a256289e17d44ed903d2045ed39f897a1061..f2b86b4e4d23a251b907b24766dfd80fe732696f 100644 (file)
--- a/gitconfig
@@ -6,7 +6,7 @@
        diff = auto
 
 [core]
-       excludesfile = /Users/simonruderich/.gitignore
+       excludesfile = HOME/.gitignore
 
 [alias]
        ci = commit -v