File: ViewDocs

package info (click to toggle)
dosemu 1.4.0+svn.1999-2
  • links: PTS
  • area: contrib
  • in suites: squeeze
  • size: 15,552 kB
  • ctags: 22,600
  • sloc: ansic: 136,915; asm: 4,107; sh: 1,606; perl: 1,411; makefile: 974; tcl: 599; awk: 404; yacc: 300; lex: 157
file content (37 lines) | stat: -rwxr-xr-x 1,023 bytes parent folder | download | duplicates (7)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
#! /bin/bash

echo "
The files ./doc/*.txt are BOLDFACE formatted. Apparently this confuses some of
our users, so we just supply this script to help them ;-)

What info do you want to be displayed ? (enter a number)
(press the "q" key to exit the viewer)
"
LIST="README.txt:README-tech.txt:dosemu manpage:dosemu.bin manpage:configuration.txt:dosemu-HOWTO.txt"
CONF="dosemu.conf chapter"

IFS=:
CHOICES=$CONF:$LIST
select file in $CHOICES; do
  if [ "$file" = "$CONF" ]; then
    line=`col -b <doc/README.txt| grep -n 'Runtime Configuration Options'|tail -n1|cut -d: -f1`
    less +$line ./doc/README.txt
    exit 0
  fi
  if [ "$file" = "dosemu manpage" ]; then
    groff -s -p -t -e -Tascii -mandoc ./man/dosemu.1|less
    exit 0
  fi
  if [ "$file" = "dosemu.bin manpage" ]; then
    groff -s -p -t -e -Tascii -mandoc ./man/dosemu.bin.1|less
    exit 0
  fi
  for i in $LIST; do
     if [ "$file" = "$i" ]; then
        less ./doc/$i
        exit 0
     fi
  done
  echo "wrong input, try again or type ^D to quit"
done