Many hyperlinks are disabled.
Use anonymous login
to enable hyperlinks.
Overview
Comment: | Install man.sh as man(1) command. |
---|---|
Downloads: | Tarball | ZIP archive | SQL archive |
Timelines: | family | ancestors | descendants | both | master | trunk |
Files: | files | file ages | folders |
SHA3-256: | 88976d4f8d6b336f0f2b913e204d3813 |
User & Date: | vandys 2001-10-25 19:16:53 |
Context
2001-10-25
| ||
19:22 | New man page organization. check-in: 0417d8ec27 user: vandys tags: master, trunk | |
19:16 | Install man.sh as man(1) command. check-in: 88976d4f8d user: vandys tags: master, trunk | |
19:15 | Convert to shell script man driver. check-in: d9ed814e76 user: vandys tags: master, trunk | |
Changes
Changes to vsta/src/bin/cmds/makefile.
147 148 149 150 151 152 153 |
ascii: ascii.o $(LD) $(LDFLAGS) -o ascii $(CRT0) ascii.o -lc install: all strip $(OUT) cp $(OUT) $(ROOT)/bin |
> |
147 148 149 150 151 152 153 154 |
ascii: ascii.o
$(LD) $(LDFLAGS) -o ascii $(CRT0) ascii.o -lc
install: all
strip $(OUT)
cp $(OUT) $(ROOT)/bin
cp man.sh $(ROOT)/bin/man
|
Added vsta/src/bin/cmds/man.sh.
> > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > |
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 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 |
#!/bin/sh # # man.sh # Simple driver to get man pages # # Manual pages live here db=/vsta/doc/man # Known manual sections dirs="1 2 3 6" # If "man 1 foo", look for a foo.1 man page directly # Otherwise, search all sections if [ $# -gt 1 ] then # If it's -k, return all matching entries if [ $1 = "-k" ] then for y in $dirs do cd $db/$y for z in *.$y do echo $z done done | grep $2 exit 0 fi # Else it's a section/entry sec=$1 entry=$2 else entry=$1 for sec in $dirs do if [ -f $db/$sec/$entry.$sec ] then break fi done fi # If couldn't find it, bail f=$db/$sec/$entry.$sec if [ ! -r $f ] then echo $entry": unknown man page" exit 1 fi # Choose pager, else default to "less" if [ -z "$PAGER" ] then PAGER=less fi # View the page exec $PAGER $f |