|
Last change
on this file since 23203 was 23203, checked in by tobayer, 13 years ago |
|
[titan] tobayer01 swapskin: beautify control files
|
|
File size:
840 bytes
|
| Line | |
|---|
| 1 | #!/bin/sh
|
|---|
| 2 |
|
|---|
| 3 | releaseversion=22775
|
|---|
| 4 | plugin="tobayer01 swapskin"
|
|---|
| 5 | plugindir="/var/swap/titanskins/tobayer01"
|
|---|
| 6 | imageversion=`cat /etc/version | cut -d "_" -f2 | sed 's/M//'`;
|
|---|
| 7 | link=`readlink /var/swap`
|
|---|
| 8 |
|
|---|
| 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 free space: $FREE kb"
|
|---|
| 13 | else
|
|---|
| 14 | sync
|
|---|
| 15 | fi
|
|---|
| 16 |
|
|---|
| 17 | if [ "$imageversion" -gt "$releaseversion" ]; then
|
|---|
| 18 | echo "Successfully installed $plugin (non-release version)."
|
|---|
| 19 | # ==> rm skin_release.xml
|
|---|
| 20 | rm $plugindir/skin_release.xml
|
|---|
| 21 | else
|
|---|
| 22 | echo "Successfully installed $plugin (release version)."
|
|---|
| 23 | # ==> mv skin_release.xml skin.xml"
|
|---|
| 24 | mv $plugindir/skin_release.xml $plugindir/skin.xml
|
|---|
| 25 | fi
|
|---|
| 26 |
|
|---|
| 27 | exit 0
|
|---|
Note:
See
TracBrowser
for help on using the repository browser.