home *** CD-ROM | disk | FTP | other *** search
/ Education Sampler 1992 [NeXTSTEP] / Education_1992_Sampler.iso / Demos / DE_FrameMaker / FrameMaker.app / fminit2.0 / MifRead < prev    next >
Text File  |  1992-08-24  |  1KB  |  40 lines

  1. #!/bin/sh
  2. # Shell file to convert various formats to Mif
  3. #
  4. # Edit as needed to execute other filters; 
  5. # The cases below should match the contents of file fminit2.0/suffixlist 
  6. #
  7. # Filters provided with standard Maker: 
  8. #   txttomif converts ascii text to mif 
  9. #   mmltomif  converts mml files to mif 
  10. #   rtftomif  converts Rich Text Format files to mif
  11. #   wntomif  converts WriteNow Format files to mif
  12. #   1.3binarytomif converts FrameMaker 1.3 format binary files to mif
  13. #
  14. # Inputs are:
  15. # $1 = input file to be filtered (full path, example: /usr/drf/foo.bar )
  16. # $2 = output file from filter   (full path, example: /usr/drf/foo.tmp )
  17. # $3 = input file's path         (           example: /usr/drf         )
  18. # $4 = fminit2.0's directory
  19. # $5 = maker's bin directory
  20. # $6 = maker's user interface language
  21. #
  22. # See what the file type is, and run the appropriate program
  23. case $1 in
  24.     *.txtalt) $4/txttomif <$1 >$2;;
  25.     # cd is dubious here.
  26.     *.mml|*.framemml) cd $4/..; $4/mmltomif -L$6 -I$3 -I~ -I. <$1 >$2;;
  27.     *.rtf) $4/rtftomif $1 $2;;
  28.     *.wn) $4/wntomif $4 $1 $2;;
  29.     *#D13)
  30.         # This is a fake suffix for Maker's use.
  31.         # dr=`expr "$1" : '\(.*\)#D13'`    #-- expr loses if $1 long
  32.         dr=`echo "$1" | sed 's/#D13$//'`
  33.         # Line up with 1.3binarytomif's expectation of finding
  34.         # .makerinit under $FMHOME.  The UNIX ports do this in
  35.         # a separate Shell script.
  36.         FMHOME=$FMHOME/fminit2.0; export FMHOME
  37.         exec $4/1.3binarytomif "$dr" "$2"
  38.         ;;
  39. esac
  40.