forked from dosemu2/dosemu2
-
Notifications
You must be signed in to change notification settings - Fork 0
/
ViewDocs
executable file
·37 lines (33 loc) · 1.01 KB
/
ViewDocs
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
#!/usr/bin/env 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