home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 5 Edit / 05-Edit.zip / wvwar062.zip / doc / x / helper-scripts / mswordview.wrapper < prev    next >
Text File  |  2000-09-20  |  800b  |  41 lines

  1. #!/bin/sh
  2. #
  3. #    mswordview.wrapper
  4. #
  5. #    Copyright 1998 Jager Enterprises and Todd Stiers
  6. #
  7. #    Run mswordview directly from X Netscape
  8. #
  9. #    T.Stiers        19980531    
  10. #
  11. #    Documentation:
  12. #
  13. #    Warning: You will need to link DOCUMENTROOT/tmp to /tmp
  14. #    to work using the current paths. Doing so might pose a 
  15. #    security issue. This whole CGI is a security issue
  16. #
  17. #    This application should be added to X netscape as
  18. #
  19. #    MIMEType    : application/msword
  20. #    Suffix      : .doc
  21. #    Application : /usr/local/bin/mswordview.wrapper %s
  22. #
  23. PATH=/bin:/usr/bin:/usr/local/bin
  24.  
  25. HTML=/tmp/mswordview.$$.html
  26.  
  27. #
  28. #    run mswordview program
  29. #
  30. wvWare "$*" > $HTML
  31.  
  32. #
  33. #    point netscape to the mswordview generated html file
  34. #
  35. netscape -remote 'openUrl(http://localhost'$HTML')'
  36.  
  37. #
  38. #    remove files within 30 seconds
  39. #
  40. (sleep 30; rm -f $HTML)&
  41.