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.postinst | |
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.postinst') (more/less context) (ignore whitespace changes)
-rwxr-xr-x | core/multimedia/opieplayer/modplug/opie-modplugin.postinst | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/core/multimedia/opieplayer/modplug/opie-modplugin.postinst b/core/multimedia/opieplayer/modplug/opie-modplugin.postinst new file mode 100755 index 0000000..c6ba49b --- a/dev/null +++ b/core/multimedia/opieplayer/modplug/opie-modplugin.postinst | |||
@@ -0,0 +1,24 @@ | |||
1 | #!/bin/sh | ||
2 | |||
3 | OPIEDIR=/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 | grep -q "$MIMELINE" $MIMEFILE | ||
10 | if [ $? != 0 ]; then | ||
11 | echo "appending mod/s3m/etc to $MIMEFILE" | ||
12 | |||
13 | echo "$MIMELINE" >> $MIMEFILE | ||
14 | fi | ||
15 | |||
16 | grep -q "$MIMETYPE" $MEDIAPLAYER | ||
17 | if [ $? != 0 ]; then | ||
18 | echo "appending $MIMETYPE to $MEDIAPLAYER" | ||
19 | |||
20 | tmpfile=/tmp/qpe-modplugin-$$.tmp | ||
21 | cat $MEDIAPLAYER | sed -e "s,^MimeType=\(.*\)\$,MimeType=\\1;$MIMETYPE," > $tmpfile | ||
22 | mv $tmpfile $MEDIAPLAYER | ||
23 | fi | ||
24 | |||