EOT
# Anything that can fetch a URL defined on the command line
-# and dump it to stdout will do here.
-$fetcher = 'httpget';
+# and dump it to stdout will do here. We try a number of
+# alternatives and crap out if we can't find any of them
+%fetchers = {"curl":"curl", "httpget":"httpget", "lynx":"lynx -source"}
+$fetcher = ""
+for $trythis in keys(fetchers) {
+ if (system(`whereis $trythis >/dev/null`) == 0) {
+ $fetcher = $fetchers{trythis}
+ }
+unless ($fetcher)
+ die("Can't find a remote URL fetcher.\n")
# Output uppercase tags, surrounded by quotes, by default.
$lower = 0;