Author: miguel
Date: 2007-05-14 10:52:28 -0400 (Mon, 14 May 2007)
New Revision: 77356

Modified:
   trunk/monodoc/scripts/mod.in
Log:
Use links if lynx is not installed

Modified: trunk/monodoc/scripts/mod.in
===================================================================
--- trunk/monodoc/scripts/mod.in        2007-05-14 14:24:45 UTC (rev 77355)
+++ trunk/monodoc/scripts/mod.in        2007-05-14 14:52:28 UTC (rev 77356)
@@ -4,9 +4,16 @@
 [EMAIL PROTECTED]@
 [EMAIL PROTECTED]@
 
-if test x$1 = x; then
+if test "x$1" = x; then
     echo Usage is: mod TOPIC
     exit 1;
 fi
 
[EMAIL PROTECTED]@ $monodocdir/mod.exe $1 | lynx -dump -stdin -force_html | 
${PAGER:-more}
+if `which lynx >& /dev/null` > /dev/null; then
+    @RUNTIME@ $monodocdir/mod.exe "$1" | lynx -dump -stdin -force_html | 
${PAGER:-more}
+else
+    tmp=$HOME/.monodoc-tmp-$$
+    @RUNTIME@ $monodocdir/mod.exe "$1" > $tmp
+    links -dump -force-html $tmp | ${PAGER:-more}
+    rm $tmp
+fi

_______________________________________________
Mono-patches maillist  -  [email protected]
http://lists.ximian.com/mailman/listinfo/mono-patches

Reply via email to