source: ipk/source/players_mediaplayermod_2_5/CONTROL/preinst@ 653

Last change on this file since 653 was 653, checked in by civer, 16 years ago

added:
-po_lt_1_0
-players_mediaplayermod_2_5
-swapplayers_mediaplayermod_2_5
...to IPK Source

File size: 1.2 KB
Line 
1#!/bin/sh
2#
3TMP=/tmp/.mediaplayer
4PLUGINDIR=/usr/lib/enigma2/python/Plugins/Extensions/MediaPlayer
5echo "syncing disk"
6sync
7
8if [ `df | grep /dev/mtdblock | grep var | sed 's/ \+/ /g' | cut -d ' ' -f4 | tail -n1 | wc -l` -eq 1 ]; then
9 SPACE=`df | grep /dev/mtdblock | grep var | sed 's/ \+/ /g' | cut -d ' ' -f4 | tail -n1`
10 FREE=`expr $SPACE - 100`
11 SIZE=70
12 MIN=0
13 echo "checking freespace"
14 if [ -e $PLUGINDIR ]; then
15 SKIP=`du $PLUGINDIR | cut -d / -f1 | tail -n1`
16 echo skipped mediaplayer
17 MIN=`expr $MIN + $SKIP`
18 fi
19 echo packege size $SIZE kb
20 echo package skiped $MIN kb
21 SIZEEND=`expr $SIZE - $MIN`
22 echo package install $SIZEEND kb
23 echo freespace size $FREE kb
24 if [ "$FREE" -lt "$SIZEEND" ]; then
25 echo "sorry no freespace left on device"
26 exit 1
27 else
28 echo ok
29 fi
30fi
31echo "installing MediaPlayer ..."
32echo "checking OS"
33if [ `cat /etc/motd | grep AAF | grep M | grep rev | wc -l` -eq 0 ]; then
34 echo ---------------------------
35 echo DONT USE this IPK Package!!
36 echo ---
37 echo Only for AAF Image!!
38 echo ---------------------------
39 exit 1
40fi
41
42if [ -e $PLUGINDIR ]; then
43 echo remove installed mediaplayer
44 rm -r $PLUGINDIR > /dev/null 2>&1
45 echo you must restart Gui before installing!!
46fi
47
48exit 0
Note: See TracBrowser for help on using the repository browser.