source: ipk/source.sh4/titanswapskins_tobayer01/CONTROL/postinst@ 23201

Last change on this file since 23201 was 23201, checked in by tobayer, 13 years ago

[titan] tobayer01 swapskin: test release/beta handling

File size: 888 bytes
Line 
1#!/bin/sh
2
3releaseversion=22775
4plugindir="/var/swap/titanskins/tobayer01"
5imageversion=`cat /etc/version | cut -d "_" -f2 | sed 's/M//'`;
6link=`readlink /var/swap`
7
8if [ `df | grep /dev/mtdblock | grep mnt | sed 's/ \+/ /g' | cut -d ' ' -f4 | head -n1 | wc -l` -eq 1 ] && [ $link = "/mnt/swapextensions" ]; then
9 SPACE=`df | grep /dev/mtdblock | grep mnt | sed 's/ \+/ /g' | cut -d ' ' -f4 | head -n1`
10 FREE=`expr $SPACE - 100`
11 echo "new freespace size $FREE kb"
12else
13 #echo "syncing disk"
14 sync
15fi
16
17echo "successfully installed"
18echo "now you can choose the new skin...."
19
20if [ "$imageversion" -gt "$releaseversion" ]; then
21 echo "=> non-release image"
22 echo "==> rm $plugindir/skin_release.xml"
23 rm $plugindir/skin_release.xml
24else
25 echo "=> release image"
26 echo "==> mv $plugindir/skin_release.xml $plugindir/skin.xml"
27 mv $plugindir/skin_release.xml $plugindir/skin.xml
28fi
29
30exit 0
Note: See TracBrowser for help on using the repository browser.