File: putman.sh

package info (click to toggle)
cron 3.0pl1-134%2Bdeb10u1
  • links: PTS, VCS
  • area: main
  • in suites: buster
  • size: 548 kB
  • sloc: ansic: 4,228; perl: 733; sh: 241; makefile: 89
file content (23 lines) | stat: -rw-r--r-- 328 bytes parent folder | download | duplicates (16)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
#!/bin/sh

# putman.sh - install a man page according to local custom
# vixie 27dec93 [original]
#
# $Id:$

PAGE=$1
DIR=$2

SECT=`expr $PAGE : '[a-z]*.\([0-9]\)'`

[ -d $DIR/man$SECT ] && {
	set -x
	cp $PAGE $DIR/man$SECT/$PAGE
	set +x
} || {
	set -x
	nroff -man $PAGE >$DIR/cat$SECT/`basename $PAGE .$SECT`.0
	set +x
}

exit 0