summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--Makefile16
1 files changed, 7 insertions, 9 deletions
diff --git a/Makefile b/Makefile
index f7c6be2..31418c9 100644
--- a/Makefile
+++ b/Makefile
@@ -2,16 +2,14 @@ url=https://webcache.googleusercontent.com/search?q=cache:http://$1+lukeshu.ath.
ua=Mozilla/5.0 (X11; Linux i686; rv:7.0.1) Gecko/20111009 IceCat/7.0.1
define deps
-cat '$1' |\
-sed 's/[ \t<>]/\n/g #tokenize' |\
+sed 's/[ \t<>]/\n/g #tokenize' '$1'|\
grep href |\
-sed "s/'/\"/g" |\
-grep -v 'href="\#' |\
-sed 's@href="/@href="http://lukeshu.ath.cx/@' |\
-sed -r 's@^href="http://([^"]*)"@\1@' |\
+sed -r \
+ -e "s/'/\"/g #normalize quotes" \
+ -e 's@^href="http://([^"]*)"@\1@ #strip href off' \
+ -e 's@^/@http://lukeshu.ath.cx/@ #fix docroot' |\
grep '^lukeshu\.ath\.cx/1/wordpress' |\
-sed 's/\#.*//' |\
-sort|uniq
+sed 's/\#.*//' | sort | uniq
endef
sleep = x=$$RANDOM; let 'x %= 15'; sleep $$((30+$$x))
@@ -36,4 +34,4 @@ dep/%: web/% Makefile
mk/%: dep/%
mkdir -p $(@D)
touch $@
- sed -e 's@.@mk/&@' -e 's@/$@/index.chtml@' $< |xargs -d '\n' $(MAKE) -k
+ sed -e 's@.@mk/&@' -e 's@/$$@/index.chtml@' $< |xargs -d '\n' $(MAKE) -k