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_Digitaluhr_blau/CONTROL/preinst

    r21395 r23646  
    11#!/bin/sh
    2 #
    3 TMP=/tmp/.picon
     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 swapstick"
    19 if [ ! -d /var/swap/bin/ ]; then
    20   echo "--------------------------"
    21         echo "no swapstick found...."
    22         echo "--------------------------"
    23         exit 1
    24 fi
    25 echo "swapstick found...."
    26 link=`readlink /var/swap`
    27 if [ -z $link ]; then
    28  link="kein link"
    29 fi
    30 if [ `df | grep /dev/mtdblock | grep mnt | sed 's/ \+/ /g' | cut -d ' ' -f4 | head -n1 | wc -l` -eq 1 ] && [ $link = "/mnt/swapextensions" ]; then
    31         SPACE=`df | grep /dev/mtdblock | grep mnt | sed 's/ \+/ /g' | cut -d ' ' -f4 | head -n1`
    32         FREE=`expr $SPACE - 100`
    33         SIZE=115
    34         echo "checking freespace"
    35         echo packege size $SIZE kb
    36         echo freespace size $FREE kb
    37         if  [ "$FREE" -lt "$SIZE" ]; then
    38                 echo "sorry no freespace left on device"
    39                 exit 1
    40         else
    41                 echo ok         
     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
    4214        fi
    4315else
    44         echo "syncing disk"
    45         sync
    46 fi
    47 buildgroup=`cat /etc/.buildgroup`
    48 echo "checking OS"       
    49 if  [ `cat /etc/motd | grep $buildgroup | grep M | grep rev | wc -l` -eq 0 ]; then               
    50         echo ---------------------------                 
    51         echo DONT USE this IPK Package!!                 
    52         echo ---                 
    53         echo Only for $buildgroup Image!!               
    54         echo ---------------------------                 
    55         exit 1           
     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
    5620fi
    5721
    58 echo "installing DigitalUhr blau for Titan..."
    59 
     22mv "$INSTDIR/usr/local/share/titan/plugins/lcdsamsung/skin.xml" "$INSTDIR/usr/local/share/titan/plugins/lcdsamsung/originalskin.xml"
    6023
    6124exit 0
Note: See TracChangeset for help on using the changeset viewer.