summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLuke Shumaker <LukeShu@sbcglobal.net>2011-12-23 03:32:59 -0500
committerLuke Shumaker <LukeShu@sbcglobal.net>2011-12-23 03:32:59 -0500
commitf88134611501801b5f4042f11f01dd9a15afcd2f (patch)
tree681adcf5b22fbaedae817960b45ce11d7f43e523
parent248e74eac04ddd0036e4b03721ea2ac90c191ae3 (diff)
2
-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