annotate lib-src/tm-html @ 14:9ee227acff29 r19-15b90

Import from CVS: tag r19-15b90
author cvs
date Mon, 13 Aug 2007 08:48:42 +0200
parents 49a24b4fd526
children 0293115a14e9
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
4
b82b59fe008d Import from CVS: tag r19-15b3
cvs
parents:
diff changeset
1 #!/bin/sh
b82b59fe008d Import from CVS: tag r19-15b3
cvs
parents:
diff changeset
2 #
14
9ee227acff29 Import from CVS: tag r19-15b90
cvs
parents: 10
diff changeset
3 # $Id: tm-html,v 1.3 1997/01/11 22:09:59 steve Exp $
4
b82b59fe008d Import from CVS: tag r19-15b3
cvs
parents:
diff changeset
4 #
b82b59fe008d Import from CVS: tag r19-15b3
cvs
parents:
diff changeset
5
14
9ee227acff29 Import from CVS: tag r19-15b90
cvs
parents: 10
diff changeset
6 PATH=${PATH:-/usr/bin:/bin}:`dirname $0 2>/dev/null`; export PATH
9ee227acff29 Import from CVS: tag r19-15b90
cvs
parents: 10
diff changeset
7
4
b82b59fe008d Import from CVS: tag r19-15b3
cvs
parents:
diff changeset
8 if [ "$TM_TMP_DIR" = "" ]; then
b82b59fe008d Import from CVS: tag r19-15b3
cvs
parents:
diff changeset
9 TM_TMP_DIR=/tmp
b82b59fe008d Import from CVS: tag r19-15b3
cvs
parents:
diff changeset
10 export TM_TMP_DIR
b82b59fe008d Import from CVS: tag r19-15b3
cvs
parents:
diff changeset
11 fi
b82b59fe008d Import from CVS: tag r19-15b3
cvs
parents:
diff changeset
12
b82b59fe008d Import from CVS: tag r19-15b3
cvs
parents:
diff changeset
13 if [ "$TM_WWW_BROWSER" = "" ]; then
b82b59fe008d Import from CVS: tag r19-15b3
cvs
parents:
diff changeset
14 TM_WWW_BROWSER=netscape
b82b59fe008d Import from CVS: tag r19-15b3
cvs
parents:
diff changeset
15 export TM_WWW_BROWSER
b82b59fe008d Import from CVS: tag r19-15b3
cvs
parents:
diff changeset
16 fi
b82b59fe008d Import from CVS: tag r19-15b3
cvs
parents:
diff changeset
17
b82b59fe008d Import from CVS: tag r19-15b3
cvs
parents:
diff changeset
18 if [ "$5" = "" ]; then
b82b59fe008d Import from CVS: tag r19-15b3
cvs
parents:
diff changeset
19 filename="$TM_TMP_DIR/mime$$.html"
b82b59fe008d Import from CVS: tag r19-15b3
cvs
parents:
diff changeset
20 else
b82b59fe008d Import from CVS: tag r19-15b3
cvs
parents:
diff changeset
21 filename="$TM_TMP_DIR/$5"
b82b59fe008d Import from CVS: tag r19-15b3
cvs
parents:
diff changeset
22 fi
b82b59fe008d Import from CVS: tag r19-15b3
cvs
parents:
diff changeset
23
b82b59fe008d Import from CVS: tag r19-15b3
cvs
parents:
diff changeset
24 echo "$2; $3 -> $filename"
b82b59fe008d Import from CVS: tag r19-15b3
cvs
parents:
diff changeset
25
b82b59fe008d Import from CVS: tag r19-15b3
cvs
parents:
diff changeset
26 tmdecode "$3" $1 $filename
b82b59fe008d Import from CVS: tag r19-15b3
cvs
parents:
diff changeset
27
b82b59fe008d Import from CVS: tag r19-15b3
cvs
parents:
diff changeset
28 case "$4" in
b82b59fe008d Import from CVS: tag r19-15b3
cvs
parents:
diff changeset
29 "play")
b82b59fe008d Import from CVS: tag r19-15b3
cvs
parents:
diff changeset
30 if [ `echo $TM_WWW_BROWSER | grep netscape` ]; then
b82b59fe008d Import from CVS: tag r19-15b3
cvs
parents:
diff changeset
31 echo netscape
b82b59fe008d Import from CVS: tag r19-15b3
cvs
parents:
diff changeset
32 if [ -h $HOME/.netscape/lock ]; then
b82b59fe008d Import from CVS: tag r19-15b3
cvs
parents:
diff changeset
33 netscape -remote "openURL(file:$filename,new-window)"
b82b59fe008d Import from CVS: tag r19-15b3
cvs
parents:
diff changeset
34 else
b82b59fe008d Import from CVS: tag r19-15b3
cvs
parents:
diff changeset
35 netscape $filename
b82b59fe008d Import from CVS: tag r19-15b3
cvs
parents:
diff changeset
36 fi
b82b59fe008d Import from CVS: tag r19-15b3
cvs
parents:
diff changeset
37 else
b82b59fe008d Import from CVS: tag r19-15b3
cvs
parents:
diff changeset
38 echo not netscape
b82b59fe008d Import from CVS: tag r19-15b3
cvs
parents:
diff changeset
39 $TM_WWW_BROWSER $filename
b82b59fe008d Import from CVS: tag r19-15b3
cvs
parents:
diff changeset
40 fi
b82b59fe008d Import from CVS: tag r19-15b3
cvs
parents:
diff changeset
41 trap 'rm -f $filename' 0 1 2 3 13 15
b82b59fe008d Import from CVS: tag r19-15b3
cvs
parents:
diff changeset
42 ;;
b82b59fe008d Import from CVS: tag r19-15b3
cvs
parents:
diff changeset
43 "extract")
b82b59fe008d Import from CVS: tag r19-15b3
cvs
parents:
diff changeset
44 echo "extract to $filename"
b82b59fe008d Import from CVS: tag r19-15b3
cvs
parents:
diff changeset
45 ;;
b82b59fe008d Import from CVS: tag r19-15b3
cvs
parents:
diff changeset
46 esac