Ignore:
Timestamp:
Sep 6, 2013, 2:39:18 AM (13 years ago)
Author:
tobayer
Message:

[titan] 0815 skins: new release/beta skin handling

Location:
ipk/source.sh4/titanswapskins_0Acht5Zehn/CONTROL
Files:
5 edited

Legend:

Unmodified
Added
Removed
  • ipk/source.sh4/titanswapskins_0Acht5Zehn/CONTROL/control

    r23139 r23281  
    11Package: titan-plugin-swapskins-0acht5zehngrey
    2 Version: 1.12
     2Version: 1.32
    33Description: Skin 0Acht5Zehn in grey for tiTan. Please use grey Picons.
    44Section: swapskins
  • ipk/source.sh4/titanswapskins_0Acht5Zehn/CONTROL/postinst

    r12781 r23281  
    11#!/bin/sh
    2 TMP=/tmp/.titanskin
    3 echo "successfully installed"
    4 link=`readlink /var/swap`
    5 if [ `df | grep /dev/mtdblock | grep mnt | sed 's/ \+/ /g' | cut -d ' ' -f4 | head -n1 | wc -l` -eq 1 ] && [ $link = "/mnt/swapextensions" ]; then
    6         SPACE=`df | grep /dev/mtdblock | grep mnt | sed 's/ \+/ /g' | cut -d ' ' -f4 | head -n1`
    7         FREE=`expr $SPACE - 100`
    8         echo new freespace size $FREE kb
     2
     3releaseversion=22775
     4plugin_short="0Acht5Zehn"
     5plugin_type="swapskin"
     6plugin_target="/var/swap/titanskins"
     7
     8plugin_dir="$plugin_target/$plugin_short"
     9plugin="$plugin_short $plugin_type"
     10
     11imageversion=`cat /etc/version | cut -d "_" -f2 | sed 's/M//'`;
     12
     13
     14### MAIN ###
     15
     16sync
     17SPACE=`getfreespace $plugin_target`
     18FREE=`expr $SPACE - 100`
     19echo
     20echo "New free space: ${FREE}kB"
     21
     22
     23if [ "$imageversion" -gt "$releaseversion" ]; then
     24        echo "Successfully installed $plugin (non-release version)."
     25        # ==> rm skin_release.xml
     26        rm $plugin_dir/skin_release.xml
    927else
    10         echo "syncing disk"
    11         sync
     28        echo "Successfully installed $plugin (release version)."
     29        # ==> mv skin_release.xml skin.xml"
     30        mv $plugin_dir/skin_release.xml $plugin_dir/skin.xml
    1231fi
    1332
  • ipk/source.sh4/titanswapskins_0Acht5Zehn/CONTROL/postrm

    r15994 r23281  
    11#!/bin/sh
    2 TMP=/tmp/.skin
    32
    4 PLUGINDIR=/var/swap/titanskins/0Acht5Zehn
    5 rm -rf /var/swap/titanskins/0Acht5Zehn
     3plugin_short="0Acht5Zehn"
     4plugin_type="swapskin"
     5plugin_target="/var/swap/titanskins"
    66
    7 echo "successfully removed"
    8 link=`readlink /var/swap`
    9 if [ `df | grep /dev/mtdblock | grep mnt | sed 's/ \+/ /g' | cut -d ' ' -f4 | head -n1 | wc -l` -eq 1 ] && [ $link = "/mnt/swapextensions" ]; then
    10         SPACE=`df | grep /dev/mtdblock | grep mnt | sed 's/ \+/ /g' | cut -d ' ' -f4 | head -n1`
    11         FREE=`expr $SPACE - 100`
    12         echo new freespace size $FREE kb
    13 else
    14         echo "syncing disk"
    15         sync
    16 fi
     7plugin_dir="$plugin_target/$plugin_short"
     8plugin="$plugin_short $plugin_type"
     9
     10
     11### MAIN ###
     12
     13rm -rf $plugin_dir
     14
     15sync
     16SPACE=`getfreespace $plugin_target`
     17FREE=`expr $SPACE - 100`
     18echo "New free space: ${FREE}kB"
     19echo
     20echo "Successfully removed $plugin."
     21
    1722exit 0
  • ipk/source.sh4/titanswapskins_0Acht5Zehn/CONTROL/preinst

    r18470 r23281  
    11#!/bin/sh
    2 #
    3 TMP=/tmp/.titanskin
    42
    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!!!"
     3plugin_size=1900
     4plugin_short="0Acht5Zehn"
     5plugin_type="swapskin"
     6plugin_target="/var/swap/titanskins"
     7
     8plugin_dir="$plugin_target/$plugin_short"
     9plugin="$plugin_short $plugin_type"
     10
     11
     12### MAIN ###
     13
     14# Is this check for anything useful???
     15#model=`cat /etc/model`
     16#echo -n "Checking box type..."
     17#if [ "$model" = "" ]; then
     18#       echo "......[FAILED]"
     19#       echo
     20#       echo "Sorry, $plugin is not available for the $model!"
     21#       echo "Aborting installation..."
     22#       exit 1
     23#else
     24#       echo "......[OK]"
     25#fi
     26
     27
     28echo -n "Checking installation directory..."
     29if [ ! -d $plugin_target ]; then
     30        echo "......[FAILED]"
     31        echo
     32        echo "'$plugin_target' not found!"
    1233        echo "Aborting installation..."
    1334        exit 1
    1435else
    15         echo "Boxtype: $model OK"
     36#       echo "......[OK]"
     37        echo
    1638fi
    1739
    18 echo "checking swapstick"
    19 if [ ! -d /var/swap/titanskins/ ]; then
    20   echo "--------------------------"
    21         echo "no swapstick found...."
    22         echo "--------------------------"
     40
     41sync
     42SPACE=`getfreespace $plugin_target`
     43FREE=`expr $SPACE - 100`
     44echo -n "Checking free space (${plugin_size}/${FREE}kB)..."
     45if [ "$FREE" -lt "$plugin_size" ]; then
     46        echo "......[FAILED]"
     47        echo
     48        echo "Not enough free space in $plugin_target!"
     49        echo "Aborting installation..."
    2350        exit 1
    24 fi
    25 echo "swapstick found...."
    26 link=`readlink /var/swap`
    27 if [ `df | grep /dev/mtdblock | grep mnt | sed 's/ \+/ /g' | cut -d ' ' -f4 | head -n1 | wc -l` -eq 1 ] && [ $link = "/mnt/swapextensions" ]; then
    28         SPACE=`df | grep /dev/mtdblock | grep mnt | sed 's/ \+/ /g' | cut -d ' ' -f4 | head -n1`
    29         FREE=`expr $SPACE - 100`
    30         SIZE=1900
    31         echo "checking freespace"
    32         echo packege size $SIZE kb
    33         echo freespace size $FREE kb
    34         if  [ "$FREE" -lt "$SIZE" ]; then
    35                 echo "sorry no freespace left on device"
    36                 exit 1
    37         else
    38                 echo ok         
    39         fi
    4051else
    41         echo "syncing disk"
    42         sync
    43 fi
    44 buildgroup=`cat /etc/.buildgroup`
    45 echo "checking OS"       
    46 if  [ `cat /etc/motd | grep $buildgroup | grep M | grep rev | wc -l` -eq 0 ]; then               
    47         echo ---------------------------                 
    48         echo DONT USE this IPK Package!!                 
    49         echo ---                 
    50         echo Only for $buildgroup Image!!               
    51         echo ---------------------------                 
    52         exit 1           
     52#       echo "......[OK]"
     53        echo
    5354fi
    5455
    55 rm -rf /var/swap/titanskins/0Acht5Zehn
    5656
    57 echo "installing Swap 0Acht5Zehn grey Skin ..."
     57# Is this check for anything useful???
     58#buildgroup=`cat /etc/.buildgroup`
     59#echo -n "Checking image type..."
     60#if [ `cat /etc/version | grep $buildgroup | wc -l` -eq 0 ]; then
     61#       echo "......[FAILED]"
     62#       echo
     63#       echo "Sorry, $plugin is not available for this image type!"
     64#       echo "Aborting installation..."
     65#       exit 1
     66#else
     67#       echo "......[OK]"
     68#fi
     69
     70
     71rm -rf $plugin_dir
     72
     73#echo -n "Installing $plugin..."
     74#echo "......[OK]"
    5875
    5976exit 0
  • ipk/source.sh4/titanswapskins_0Acht5Zehn/CONTROL/prerm

    r12781 r23281  
    11#!/bin/sh
    2 TMP=/tmp/.titanskin
    3 link=`readlink /var/swap`
    4 if [ `df | grep /dev/mtdblock | grep mnt | sed 's/ \+/ /g' | cut -d ' ' -f4 | head -n1 | wc -l` -eq 1 ] && [ $link = "/mnt/swapextensions" ]; then
    5         SPACE=`df | grep /dev/mtdblock | grep mnt | sed 's/ \+/ /g' | cut -d ' ' -f4 | head -n1`
    6         FREE=`expr $SPACE - 100`
    7         echo new freespace size $FREE kb
    8 else
    9         echo "syncing disk"
    10         sync
    11 fi
    12 echo "removing Swap 0Acht5Zehn grey Skin"
     2
     3plugin_short="0Acht5Zehn"
     4plugin_type="swapskin"
     5plugin_target="/var/swap/titanskins"
     6
     7plugin_dir="$plugin_target/$plugin_short"
     8plugin="$plugin_short $plugin_type"
     9
     10
     11### MAIN ###
     12
     13sync
     14SPACE=`getfreespace $plugin_target`
     15FREE=`expr $SPACE - 100`
     16echo "Old free space: ${FREE}kB"
     17
    1318exit 0
Note: See TracChangeset for help on using the changeset viewer.