author | llornkcor <llornkcor> | 2002-07-20 22:07:31 (UTC) |
---|---|---|
committer | llornkcor <llornkcor> | 2002-07-20 22:07:31 (UTC) |
commit | 2342d48be31847e7ead9d1cc682452e8f0122351 (patch) (unidiff) | |
tree | 8329bb94e9d429c905a0ef6b881cf1c0f775bf14 /core/multimedia/opieplayer/modplug/opie-modplugin.postrm | |
parent | 0f24c1fb86d3bb58d8696358b824c0e01752b10d (diff) | |
download | opie-2342d48be31847e7ead9d1cc682452e8f0122351.zip opie-2342d48be31847e7ead9d1cc682452e8f0122351.tar.gz opie-2342d48be31847e7ead9d1cc682452e8f0122351.tar.bz2 |
initial commit of modplugin
Diffstat (limited to 'core/multimedia/opieplayer/modplug/opie-modplugin.postrm') (more/less context) (ignore whitespace changes)
-rwxr-xr-x | core/multimedia/opieplayer/modplug/opie-modplugin.postrm | 26 |
1 files changed, 26 insertions, 0 deletions
diff --git a/core/multimedia/opieplayer/modplug/opie-modplugin.postrm b/core/multimedia/opieplayer/modplug/opie-modplugin.postrm new file mode 100755 index 0000000..c043682 --- a/dev/null +++ b/core/multimedia/opieplayer/modplug/opie-modplugin.postrm | |||
@@ -0,0 +1,26 @@ | |||
1 | #!/bin/sh | ||
2 | |||
3 | QPEDIR=/opt/QtPalmtop | ||
4 | MIMEFILE=$OPIEDIR/etc/mime.types | ||
5 | MEDIAPLAYER=$OPIEDIR/apps/Applications/opieplayer.desktop | ||
6 | MIMETYPE="audio/x-mod" | ||
7 | MIMELINE="$MIMETYPE669 amf apun dsm far gdm imf it med mod mtm nst s3m stm stx ult uni xm" | ||
8 | |||
9 | tmpfile=/tmp/qpe-modplugin$$.tmp | ||
10 | |||
11 | grep -q "$MIMELINE" $MIMEFILE | ||
12 | if [ $? == 0 ]; then | ||
13 | echo "removing mod/s3m/etc from $MIMEFILE" | ||
14 | |||
15 | grep -v "$MIMELINE" $MIMEFILE > $tmpfile | ||
16 | mv $tmpfile $MIMEFILE | ||
17 | fi | ||
18 | |||
19 | grep -q "$MIMETYPE" $MEDIAPLAYER | ||
20 | if [ $? == 0 ]; then | ||
21 | echo "removing $MIMETYPE from $MEDIAPLAYER" | ||
22 | |||
23 | cat $MEDIAPLAYER | sed -e "s,^MimeType=\(.*\);$MIMETYPE\(\.*\)\$,MimeType=\\1\\2," > $tmpfile | ||
24 | mv $tmpfile $MEDIAPLAYER | ||
25 | fi | ||
26 | |||