summaryrefslogtreecommitdiffstats
path: root/retiolum/Makefile
diff options
context:
space:
mode:
authormakefu <github@syntax-fehler.de>2011-08-12 21:16:37 +0200
committermakefu <github@syntax-fehler.de>2011-08-12 21:16:37 +0200
commitcc0526ab7a97c9831e47725042f1ad1dd70ef1d6 (patch)
treeea33454876316fb503b7f0bbe5c657d9f9b1fa54 /retiolum/Makefile
parenta4da8a49f19ba5d9a7d51fffa518dfd07b41f3c5 (diff)
retiolum/Makefile: correct rules for update
the makefile will do the right thing now when just calling "make" it will update the hosts, write symlinks, copy all hostsfiles AND update the /etc/hosts.
Diffstat (limited to 'retiolum/Makefile')
-rw-r--r--retiolum/Makefile25
1 files changed, 15 insertions, 10 deletions
diff --git a/retiolum/Makefile b/retiolum/Makefile
index 85020c9f..b3ee3f9b 100644
--- a/retiolum/Makefile
+++ b/retiolum/Makefile
@@ -1,22 +1,27 @@
-.phony: update it all so install
+RETIOLUM_HOSTS = /etc/tinc/retiolum/hosts
-all:
- cat Makefile
+.PHONY: update it all so install
+
+all: update links
+
+links:
+ ln -sf $$PWD/bin/update_tinc_hosts ../bin/update_tinc_hosts
+ ln -sf $$PWD/bin/fillxx ../bin/fillxx
it: so
so: it
-/etc/tinc/retiolum/hosts:
- cd $(dir $@) && git clone https://github.com/krebscode/hosts
+hosts/:
+ @echo "Writing new copy of hosts"
+ [ -e $(RETIOLUM_HOSTS) ] || mkdir -p $(RETIOLUM_HOSTS)
+ cp -r hosts/* $(RETIOLUM_HOSTS)/
-#TODO conflicting
-update: /etc/tinc/retiolum/hosts
- cd $< && git pull
-install:
+install: autohosts
+ @# will not run automatically
scripts/tinc_setup/install.sh
-autohosts:
+update: hosts/
@echo creating Magic
bin/update_tinc_hosts "create magic" || true
@echo adding hosts