home *** CD-ROM | disk | FTP | other *** search
/ Education Sampler 1992 [NeXTSTEP] / Education_1992_Sampler.iso / Demos / DE_FrameMaker / FrameMaker.app / Configure-ukenglish next >
Text File  |  1992-08-24  |  1KB  |  53 lines

  1. #!/bin/sh
  2.  
  3. #
  4. # Configure FrameMaker to use the UI language given in the script's $0,
  5. # i.e., a script named Configure-ukenglish sets up the languages file
  6. # and templates to refer to ukenglish.
  7. #
  8.  
  9. Program=$0 FMINIT=fminit2.0
  10. trap "echo $Program"': $rc.' 0
  11. rc=FAILED
  12.  
  13. langue=`basename $Program | sed -e 's/.*-\(.*\)/\1/'`
  14. echo "Configuring FrameMaker for user-interface language $langue..."
  15. P=`pwd`
  16. cd `expr /$Program : '\(.*\)/[^/]*' \| /$P`/$FMINIT
  17. if [ ! -r languages.$langue ]; then
  18.     echo "
  19. Error: no languages.$langue file in `pwd`
  20. " >&2
  21.     exit 1
  22. fi
  23.  
  24. # Check to see that user can write directory.
  25. rm -f Configtmp.$$
  26. touch Configtmp.$$ 2>/dev/null || {
  27.     echo "
  28. You do not have permission to configure FrameMaker for $langue.
  29. Contact a system administrator or the person who installed the software.
  30. " >&2
  31.     exit 1
  32. }
  33. rm -f Configtmp.$$
  34.  
  35. # This is lame.
  36. case $langue in
  37. usenglish)
  38.     langdir=english
  39.     ;;
  40. *)
  41.     langdir=$langue
  42.     ;;
  43. esac
  44.  
  45. # Do it.
  46. rm -f languages
  47. ln -s languages.$langue languages
  48. rm -f fmtemplates
  49. ln -s $langdir/Templates.$langue fmtemplates
  50. rm -f installtraining.files
  51. ln -s $langdir/training.$langue installtraining.files
  52. rc=SUCCEEDED
  53.