home *** CD-ROM | disk | FTP | other *** search
/ Big Green CD 8 / BGCD_8_Dev.iso / NEXTSTEP / UNIX / Programming / rcs-5.7-MIHS / rcs.pkg / rcs.post_install < prev    next >
Encoding:
Text File  |  1997-06-03  |  986 b   |  41 lines

  1. #!/bin/sh
  2. # AUTOMATICALLY GENERATED BY gzip_package 2.5 of 1996/12/21 14:15:52.
  3.  
  4. d="$1"
  5. n=`basename "$d" .pkg`
  6. p="$d/$n"
  7. t="/tmp/##gzip_package##$n.tar.Z"
  8.  
  9. # Determine working directory used by Installer.
  10. # (Its contents are copied to /NextLibrary/Receipts)
  11. wd=`echo "$0"|sed 's:[^/]*$::;s://*$::'`
  12. case "$wd" in #((
  13. /tmp/*|/private/tmp/*) ;;
  14. *) wd=/tmp
  15. esac
  16. wp="$wd/$n"
  17.  
  18. # Go cleanup the temporary compressed archive.
  19. rm -f "$t"
  20.  
  21. size=`sed -n 's/^realCompressedSize \(.*\)/\1/p' "$wp.sizes"`
  22. [ -n "$size" ] && {
  23.     rm -f "$wp.sizes"
  24.  
  25.     # Restore original values in *.sizes
  26.     sed 's/^\(CompressedSize\).*/\1 '"$size"'/
  27.              /^realCompressedSize/d' "$p.sizes" >"$wp.sizes"
  28. }
  29.  
  30. # Replace gzip_package pre_ and post_install with the real scripts.
  31. for i in pre_install post_install
  32. do
  33.     rm -f "$wp.$i"
  34.     [ -f "$d/real_$i" ] && cp -p "$d/real_$i" "$wp.$i"
  35. done
  36.  
  37. # Now continue with the real post_install script if there is any.
  38. [ -f "$wp.post_install" ] && exec "$wp.post_install" "$@"
  39.  
  40. echo OK.
  41.