#!/bin/sh setglobal PI = '.postinstall' setglobal TMP = '/usr/tmp' setglobal PATH = '/bin:/usr/bin:/usr/local/bin' if test "$Argc" -ne 1 { echo "Usage: $0 " exit 1 } setglobal dir = $[pwd] if test $1 = "-" { setglobal f = ''"" } else { match $1 { with /* setglobal f = $1 with * setglobal f = ""$dir/$1"" } } cd $TMP rm -f $PI if test -f $PI { echo "$PI is in $TMP, please remove it first." exit 1 } if test ! -f $f { echo "Couldn't find package $f." exit 1 } # can we execute bunzip2? if bunzip2 --help !2 > !1 | grep usage >/dev/null { setglobal BUNZIP2 = 'bunzip2' } else { setglobal BUNZIP2 = 'smallbunzip2' } cat $f | $BUNZIP2 | pax -r -p e if test -f $PI { sh -e $PI rm -f $PI } for d in [/usr/man /usr/local/man /usr/gnu/man /usr/X11R6/man] { if test -d $d { makewhatis $d } }