Ignore:
Timestamp:
Sep 10, 2013, 8:09:28 PM (13 years ago)
Author:
gost
Message:

[plugins] fix lcdsamsung skins

File:
1 edited

Legend:

Unmodified
Added
Removed
  • ipk/source/lcdsamsungskins_channel_2/CONTROL/preinst

    r21451 r23646  
    11#!/bin/sh
    2 #
    3 TMP=/tmp/.TOOLS
     2INSTDIR="$1"
    43
    5 model=`cat /etc/model`
    6 echo""
    7 echo "Checking your Boxtype...."
    8 echo "Some Plugins will not work correctly on your $model!"
    9 echo ""
    10 if [ "$model" = "" ]; then
    11         echo "Sorry! This Plugin is not available for your $model because it will not work correctly!!!"
    12         echo "Aborting installation..."
    13         exit 1
    14 else
    15         echo "Boxtype: $model OK"
     4if [ ! -d /var/usr/local/share/titan/plugins/lcdsamsung ]; then
     5  echo "ERROR .... lcdsamsung not installed"
     6  exit 1
    167fi
    178
    18 echo "checking lcdsamsung installation"
    19 if [ ! -d /var/swap/titanplugins/lcdsamsung ]; then
    20   echo "--------------------------"
    21         echo "Keine lcdsamsung Installation gefunden! Bitte erst das lcdsamsung Plugin installieren!"
    22         echo "--------------------------"
    23         exit 1
    24 fi
    25 echo "lcdsamsung Installation ok...."
    26 
    27 link=`readlink /var/swap`
    28 if [ -z $link ]; then
    29  link="kein link"
     9samsungdir=`readlink /var/usr/local/share/titan/plugins/lcdsamsung`
     10if [ ! $samsungdir ]; then 
     11        if [ $INSTDIR != "/var" ]; then
     12                        echo "ERROR .... lcdsamsung not installed in dir $INSTDIR"
     13                        exit 1
     14        fi
     15else
     16        if [ $samsungdir != "$instdir/usr/local/share/titan/plugins/lcdsamsung" ]; then
     17                        echo "ERROR .... lcdsamsung not installed in dir $INSTDIR"
     18                        exit 1
     19        fi
    3020fi
    3121
    32 if [ `df | grep /dev/mtdblock | grep mnt | sed 's/ \+/ /g' | cut -d ' ' -f4 | head -n1 | wc -l` -eq 1 ] && [ $link = "/mnt/swapextensions" ]; then
    33         SPACE=`df | grep /dev/mtdblock | grep mnt | sed 's/ \+/ /g' | cut -d ' ' -f4 | head -n1`
    34         FREE=`expr $SPACE - 100`
    35         SIZE=1000
    36         echo "checking freespace"
    37         echo packege size $SIZE kb
    38         echo freespace size $FREE kb
    39         if  [ "$FREE" -lt "$SIZE" ]; then
    40                 echo "sorry no freespace left on device"
    41                 exit 1
    42         else
    43                 echo ok         
    44         fi
    45 else
    46         echo "syncing disk"
    47         sync
    48 fi
    49 buildgroup=`cat /etc/.buildgroup`
    50 echo "checking OS"       
    51 if  [ `cat /etc/motd | grep $buildgroup | grep M | grep rev | wc -l` -eq 0 ]; then               
    52         echo ---------------------------                 
    53         echo DONT USE this IPK Package!!                 
    54         echo ---                 
    55         echo Only for $buildgroup Image!!               
    56         echo ---------------------------                 
    57         exit 1           
    58 fi
    59 
    60 mv /var/swap/titanplugins/lcdsamsung/skin.xml /var/swap/titanplugins/lcdsamsung/originalskin.xml
    61 echo "Sichere Originalskin....."
    62 
    63 echo "Installiere Samsung LCD Skin..."
     22mv "$INSTDIR/usr/local/share/titan/plugins/lcdsamsung/skin.xml" "$INSTDIR/usr/local/share/titan/plugins/lcdsamsung/originalskin.xml"
    6423
    6524exit 0
Note: See TracChangeset for help on using the changeset viewer.