home *** CD-ROM | disk | FTP | other *** search
/ Liren Large Software Subsidy 15 / 15.iso / s / s053 / 38.ddi / root.3 / etc / profile
Encoding:
Text File  |  1990-10-03  |  952 b   |  44 lines

  1. #ident    "@(#)pkg4.i386:scde/profile    1.1"
  2. #-------
  3. # profile build file
  4. #
  5. # This build file edits /etc/profile.
  6. #
  7. # During installation, it appends a line which will make
  8. # the new compilation system the default.
  9. #
  10. # During removal, it removes the line it added before.
  11. #
  12. # To use this, there should be a line like
  13. #
  14. #     e build /etc/profile ? ? ?
  15. #
  16. # in the package prototype file.
  17. #
  18. # PKGINST should be provided by the installation service.
  19. # CORESIDENT set by request script.
  20. #-------
  21. : ${PKGINST:=scde}
  22.  
  23. PROFILE=/etc/profile
  24.  
  25. #-------
  26. # Don't export PATH in this command; let its export status remain
  27. # whatever it is already.
  28. #-------
  29. LINE=
  30. case "$CORESIDENT"
  31. {
  32. y)    LINE='PATH="/usr/ccs/bin:$PATH"'        ;;
  33. n)    LINE='PATH="$PATH:/usr/ccs/bin"'        ;;
  34. *)    echo profile: error: CORESIDENT = $CORESIDENT    ;;
  35. }
  36. LINE="$LINE    # Installed by package instance $PKGINST"
  37.  
  38. grep -v "^$LINE$" $PROFILE    || exit 2
  39.  
  40. if    [ "$1" = install ]
  41. then    echo "$LINE"        || exit 2
  42. fi
  43. exit 0
  44.