lib/Tools/doc
changeset 15703 727ef1b8b3ee
parent 14981 e73f8140af78
child 15717 541e50adfc73
     1.1 --- a/lib/Tools/doc	Wed Apr 13 09:48:41 2005 +0200
     1.2 +++ b/lib/Tools/doc	Wed Apr 13 18:34:22 2005 +0200
     1.3 @@ -40,6 +40,7 @@
     1.4    IFS=":"
     1.5    for DIR in $ISABELLE_DOCS
     1.6    do
     1.7 +    [ -d "$DIR" ] || fail "Bad document directory: $DIR"
     1.8      [ -f "$DIR/Contents" ] && grep -v "^>>" "$DIR/Contents"
     1.9    done
    1.10    IFS="$ORIG_IFS"
    1.11 @@ -48,7 +49,12 @@
    1.12    IFS=":"
    1.13    for DIR in $ISABELLE_DOCS
    1.14    do
    1.15 -    [ -f "$DIR/$DOC.dvi" ] && { cd "$DIR"; IFS="$ORIG_IFS"; exec $DVI_VIEWER "$DOC.dvi"; }
    1.16 +    IFS="$ORIG_IFS"
    1.17 +    [ -d "$DIR" ] || fail "Bad document directory: $DIR"
    1.18 +    for FMT in "$ISABELLE_DOC_FORMAT" dvi
    1.19 +    do
    1.20 +      [ -f "$DIR/$DOC.$FMT" ] && { cd "$DIR"; exec "$ISATOOL" display "$DOC.$FMT"; }
    1.21 +    done
    1.22    done
    1.23    IFS="$ORIG_IFS"
    1.24    fail "Unknown Isabelle document: $DOC"