Create a Makefile for installation
This commit is contained in:
parent
826c5db8e4
commit
6a3e7e7936
20 changed files with 33 additions and 8 deletions
24
Makefile
Normal file
24
Makefile
Normal file
|
@ -0,0 +1,24 @@
|
|||
excludes = -I Makefile -I README.md
|
||||
symlinks = $(shell ls $(excludes) `pwd`)
|
||||
|
||||
.PHONY: $(symlinks)
|
||||
|
||||
all: install
|
||||
|
||||
install: submodules $(symlinks)
|
||||
|
||||
submodules:
|
||||
git submodule update --init
|
||||
|
||||
$(symlinks):
|
||||
test -e `pwd`/$@ \
|
||||
&& ln -sfn `pwd`/$@ ~/.$@
|
||||
|
||||
update: update-repo $(symlinks)
|
||||
|
||||
update-repo:
|
||||
git pull --rebase
|
||||
git submodule update
|
||||
|
||||
clean:
|
||||
for file in $(symlinks); do rm ~/.$$file; done
|
Loading…
Add table
Add a link
Reference in a new issue