File: mswordview.wrapper

package info (click to toggle)
mswordview 0.4.4-1
  • links: PTS
  • area: main
  • in suites: slink
  • size: 3,784 kB
  • ctags: 860
  • sloc: ansic: 8,140; perl: 4,379; makefile: 165; sh: 123; csh: 28
file content (40 lines) | stat: -rwxr-xr-x 805 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
#!/bin/sh
#
#	mswordview.wrapper
#
#	Copyright 1998 Jager Enterprises and Todd Stiers
#
#	Run mswordview directly from X Netscape
#
#	T.Stiers		19980531	
#
#	Documentation:
#
#	Warning: You will need to link DOCUMENTROOT/tmp to /tmp
#	to work using the current paths. Doing so might pose a 
#	security issue. This whole CGI is a security issue
#
#	This application should be added to X netscape as
#
#	MIMEType    : application/msword
#	Suffix      : .doc
#	Application : /usr/local/bin/mswordview.wrapper %s
#
PATH=/bin:/usr/bin:/usr/local/bin

HTML=/tmp/mswordview.$$.html

#
#	run mswordview program
#
mswordview "$*" > $HTML

#
#	point netscape to the mswordview generated html file
#
netscape4 -remote 'openUrl(http://localhost'$HTML')'

#
#	remove files within 30 seconds
#
(sleep 30; rm -f $HTML)&