home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #19 / NN_1992_19.iso / spool / comp / unix / aux / 3287 < prev    next >
Encoding:
Internet Message Format  |  1992-08-29  |  1.9 KB

  1. Path: sparky!uunet!alisa.com!dakota!denny
  2. Newsgroups: comp.unix.aux
  3. Subject: Re: Shell script for installing man pages (was: man's problems)
  4. Message-ID: <1992Aug29.172116.7530@alisa.com>
  5. From: denny@alisa.com (Bob Denny)
  6. Date: Sat, 29 Aug 1992 17:21:16 GMT
  7. References: <1992Aug23.231247.6667@sunova.ssc.gov> <Btnu40.JyL@news.udel.edu>
  8. Organization: Alisa Systems, Inc.
  9. Lines: 55
  10.  
  11. In <Btnu40.JyL@news.udel.edu> johnston@me.udel.edu (Bill Johnston) writes:
  12.  
  13. > Here is a shell script by Bob Denny that I found in the archives on
  14. > aux.support.apple.com.  It makes installing aux-ready man pages...
  15.  
  16. Here are the scripts for linking and removing manpages that I use in most
  17. of my A/UX ports:
  18.  
  19. #!/bin/sh
  20. # @(#) linkman - link to existing man page
  21. #
  22. # Bob Denny - Mon Sep 16 17:02:40 1991
  23. #
  24. # If orig and link end in ".z", but orig is there without ".z"
  25. # (pack not needed), will link new without the ".z". Needed for
  26. # A/UX pre-formatted man page system.
  27. #
  28. # BUGS: Should support symbolic links
  29.  
  30. src=$1
  31. srcnoz=`echo $1 | sed 's/\(.*\)\.z$/\1/`
  32. dest=$2
  33. destnoz=`echo $2 | sed 's/\(.*\)\.z$/\1/`
  34.  
  35. rm -f $dest $destnoz
  36.  
  37. if [ -f $src ] ; then
  38.     ln $src $dest
  39. elif [ -f $srcnoz ] ; then
  40.     ln $srcnoz $destnoz
  41. else
  42.     echo "$0: source $1 nonexistent."
  43.     exit 1
  44. fi
  45. exit 0
  46.  
  47. #!/bin/sh
  48. # @(#) - rmvman - remove man page
  49. #
  50. # Bob Denny - Mon Sep 16 17:22:56 1991
  51. #
  52. # Removes man page(s), gets those that do or do not end in ".z".
  53. # Needed for A/UX pre-formatted man page system.
  54. #
  55.  
  56. for i in $* ; do
  57.     echo "rm -f $i `echo $i | sed 's/\(.*\)\.z$/\1/`"
  58.     rm -f $i `echo $i | sed 's/\(.*\)\.z$/\1/`
  59. done
  60.  
  61. exit 0
  62. _______________________________________________________________________________
  63. Robert B. Denny                                           voice: (818) 792-9474
  64. Alisa Systems, Inc.                                         fax: (818) 792-4068
  65. Pasadena, CA                         (denny@alisa.com, ..uunet!alisa.com!denny)
  66.