diff options
Diffstat (limited to '')
-rw-r--r-- | git/.gitignore | 1 | ||||
-rw-r--r-- | git/Makefile | 16 | ||||
-rwxr-xr-x | git/new-c-proj (renamed from base/new-c-proj) | 4 |
3 files changed, 14 insertions, 7 deletions
diff --git a/git/.gitignore b/git/.gitignore new file mode 100644 index 0000000..7fada2a --- /dev/null +++ b/git/.gitignore @@ -0,0 +1 @@ +/.config diff --git a/git/Makefile b/git/Makefile index 13c3740..4d67fe2 100644 --- a/git/Makefile +++ b/git/Makefile @@ -1,21 +1,27 @@ .POSIX: -include ../common.mk install: mkdir -p -- ~/.config/git - cat config ../.secrets/git/config > ~/.config/git/config + test ! -e ~/.config/git/config || test -L ~/.config/git/config + test ! -e ~/.config/git/config || test -f ~/.config/git/config + cat config ../.secrets/git/config >> .config + ln -sf -- ~/.dotfiles/git/.config ~/.config/git/config mkdir -p -- ~/.config/bash/aliases.d test ! -d ~/.config/bash/aliases.d/git ln -sf -- ~/.dotfiles/git/bash-aliases ~/.config/bash/aliases.d/git - $(CHECK_INSTALLED) dash + ../check-installed-shebang ge mkdir -p -- ~/.local/bin ln -sf -- ~/.dotfiles/git/ge ~/.local/bin/ + ln -sf -- ~/.dotfiles/git/new-c-proj ~/.local/bin/ uninstall: + +! ../check-installed git -unlink -- ~/.config/git/config - -rmdir -- ~/.config/git + -rmdir -- ~/.config/git/ -unlink -- ~/.config/bash/aliases.d/git -rmdir -- ~/.config/bash/aliases.d -unlink -- ~/.local/bin/ge + -unlink -- ~/.local/bin/new-c-proj -.PHONY: install uninstall +clean: + -rm -f -- .config diff --git a/base/new-c-proj b/git/new-c-proj index 48f8d83..ce04f39 100755 --- a/base/new-c-proj +++ b/git/new-c-proj @@ -214,9 +214,9 @@ cat > config.mk <<-EOF PREFIX = /usr MANPREFIX = \$(PREFIX)/share/man - CC = cc + CC = c99 CPPFLAGS = -D_DEFAULT_SOURCE -D_BSD_SOURCE -D_XOPEN_SOURCE=700 -D_GNU_SOURCE - CFLAGS = -std=c99 -Wall -g + CFLAGS = LDFLAGS = EOF |