summaryrefslogtreecommitdiff
path: root/audio/realplayer7/patches/patch-aa
blob: 3909bfcf5b965ca4c024d6b4fb946ac81d2c5cea (plain)
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
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
$NetBSD: patch-aa,v 1.4 2000/08/22 10:56:39 wiz Exp $

--- mimeinstall.sh.orig	Wed Aug  9 15:53:59 2000
+++ mimeinstall.sh	Tue Aug 15 02:20:41 2000
@@ -12,9 +12,12 @@
 # 3 mimetypes (space sep)
 # 4 mime.types location
 
+REALPLAY=@@PREFIX@@/bin/realplay
+LOC=@@REALPLAYER_HOME@@
+
 if [ ! -f realplay ] ;  then
-    echo "This shell script should only be run from the installed location of the"
-    echo "RealPlayer.  Please cd to that directory and try again"
+    echo "This shell script should only be run from ${LOC}."
+    echo "Please cd to that directory and try again."
     exit
 fi
 
@@ -33,7 +36,8 @@
                     sed s:__EXT__:$kdestyleexts:g > $filename
     fi
     mkdir -p `dirname $2/$1`
-    cat $filename | sed s:__LOCATION__:`pwd`:g > $2/$1.kdelnk
+    cat $filename | sed s:__LOCATION__:${LOC}:g \
+		| sed s:__REALPLAY__:${REALPLAY}:g > $2/$1.kdelnk
     rm $filename
     filesmodified=$2/$1.kdelnk
 
@@ -50,7 +54,7 @@
  # how come gnome doesn't let you do absolute paths?
     printf "\topen=realplay %%f &\n" >> $GNOMEDEST/realplay.keys
     printf "\tview=realplay %%f &\n" >> $GNOMEDEST/realplay.keys
-    printf "\ticon-filename=`pwd`/rp7doc.png\n" >> $GNOMEDEST/realplay.keys
+    printf "\ticon-filename=${LOC}/rp7doc.png\n" >> $GNOMEDEST/realplay.keys
     filesmodified="$filesmodified $GNOMEDEST/realplay.keys"
 
     mkdir -p $GNOMEDEST
@@ -85,7 +89,7 @@
             if [ -f $mailcapdest ] ; then
 		    grep -v $1 $mailcapdest > /tmp/$$ && cp /tmp/$$ $mailcapdest && rm -f /tmp/$$
 	    fi
-	    echo "$1;`pwd`/realplay \"%u\"" >> $mailcapdest
+	    echo "$1;${REALPLAY} \"%u\"" >> $mailcapdest
 	    filesmodified="$filesmodified $mailcapdest"
     done
 
@@ -100,9 +104,6 @@
     exit 1
 }
 
-REALPLAY=`pwd`/realplay
-LOC=`pwd`
-
 if [ "$2" = "global" ];
 then 
     STDDEST=global
@@ -126,11 +127,13 @@
 
 # first install the app
 mkdir -p $KDEAPPDEST
-cat app.kdelnk | sed "s:__LOCATION__:`pwd`:g" > $KDEAPPDEST/RealPlayer.kdelnk
+cat app.kdelnk | sed "s:__LOCATION__:${LOC}:g" \
+	| sed "s:__REALPLAY__:${REALPLAY}:g" > $KDEAPPDEST/RealPlayer.kdelnk
 echo "Installed Realplayer link for KDE"
 
 mkdir -p $GNOMEAPPDEST
-cat realplay.desktop | sed "s:__LOCATION__:`pwd`:g" > $GNOMEAPPDEST/realplayer.desktop
+cat realplay.desktop | sed "s:__LOCATION__:${LOC}:g" \
+	| sed "s:__REALPLAY__:${REALPLAY}:g" > $GNOMEAPPDEST/realplayer.desktop
 echo "Installed Realplayer link for Gnome"
 
 printf "%-30s%-50s\n" MIMETYPE "INSTALLED LOCATION"