install-man (599B)
1 #!/bin/sh 2 set -e 3 4 umask 022 5 test -d package || sh -cx '! : Wrong working directory.' 6 test -d man || sh -cx '! : Wrong working directory.' 7 8 here=`env - PATH=$PATH pwd` 9 parent=`dirname $here` 10 11 echo 'Compressing manpages...' 12 for i in man/*.[1-8]; do 13 gzip -c $i >${i}.gz 14 done 15 16 echo 'Making manpage links in /usr/local/man...' 17 cd man 18 for i in 8; do 19 mkdir -p /usr/local/man/man$i 20 for j in *.$i; do 21 rm -f /usr/local/man/man$i/$j.gz'{new}' 22 ln -s $parent/runit/man/$j.gz /usr/local/man/man$i/$j.gz'{new}' 23 mv -f /usr/local/man/man$i/$j.gz'{new}' /usr/local/man/man$i/$j.gz 24 done 25 done 26 cd ..