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

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

[titan] tobayer01 swapskin: optimize control files

File size: 1.1 KB
Line 
1#!/bin/sh
2
3releaseversion=22775
4plugin_short="tobayer01"
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### FUNCTIONS ###
15
16RES_COL=60 # column number to place the status message
17MOVE_TO_COL="echo -en \\033[${RES_COL}G" # command to move to the configured column number
18
19echo_success() { # function to print the SUCCESS status
20 $MOVE_TO_COL; echo -n "[ OK ]"; echo
21}
22
23echo_failure() {
24 $MOVE_TO_COL; echo -n "[FAILED]"; echo # function to print the FAILED status message
25}
26
27
28
29### MAIN ###
30
31sync
32SPACE=`getfreespace $plugin_target`
33FREE=`expr $SPACE - 100`
34echo
35echo "New free space: $FREE kB"
36
37
38if [ "$imageversion" -gt "$releaseversion" ]; then
39 echo "Successfully installed $plugin (non-release version)."
40 # ==> rm skin_release.xml
41 rm $plugin_dir/skin_release.xml
42else
43 echo "Successfully installed $plugin (release version)."
44 # ==> mv skin_release.xml skin.xml"
45 mv $plugin_dir/skin_release.xml $plugin_dir/skin.xml
46fi
47
48exit 0
Note: See TracBrowser for help on using the repository browser.