From: Lyndon Nerenberg Date: Sun, 5 Oct 2014 08:20:56 +0000 (-0700) Subject: On FreeBSD, use fetch(1) to retrieve external content through URLs. X-Git-Url: https://diplodocus.org/git/nmh/commitdiff_plain/33619bd9279b5496584a85c0be928c6165a998a1 On FreeBSD, use fetch(1) to retrieve external content through URLs. fetch(1) is part of the base system, so it's guaranteed to always be there. And it is more likely to have been configured for any local site customizations (local caches, proxies, etc). --- diff --git a/etc/mhn.defaults.sh b/etc/mhn.defaults.sh index 298dae60..28d113a0 100755 --- a/etc/mhn.defaults.sh +++ b/etc/mhn.defaults.sh @@ -314,10 +314,17 @@ fi # This entry is used to retrieve external-body types that use a "url" # access-type. -PGM=`$SEARCHPROG "$SEARCHPATH" curl` -if [ ! -z "$PGM" ]; then - echo "nmh-access-url: $PGM -L" >> $TMP -fi +case "`uname`" in + FreeBSD) + echo "nmh-access-url: fetch -a" >> $TMP + ;; + *) + PGM=`$SEARCHPROG "$SEARCHPATH" curl` + if [ ! -z "$PGM" ]; then + echo "nmh-access-url: $PGM -L" >> $TMP + fi + ;; +esac # output a sorted version of the file sort < $TMP