summaryrefslogtreecommitdiff
path: root/openembedded/packages/zaurus-updater/spitz
diff options
context:
space:
mode:
authorRichard Purdie <richard@openedhand.com>2005-09-20 07:04:35 +0000
committerRichard Purdie <richard@openedhand.com>2005-09-20 07:04:35 +0000
commitb4a7122cacef647dbec3db5c9ebe1e504a7670df (patch)
tree006885a1f4e8032062632ee1a091e72c32dd2810 /openembedded/packages/zaurus-updater/spitz
parentf9e1d16bfa73a2df5254c63ae1abb6a4bbe0a062 (diff)
downloadopenembedded-core-b4a7122cacef647dbec3db5c9ebe1e504a7670df.tar.gz
openembedded-core-b4a7122cacef647dbec3db5c9ebe1e504a7670df.tar.bz2
openembedded-core-b4a7122cacef647dbec3db5c9ebe1e504a7670df.tar.xz
openembedded-core-b4a7122cacef647dbec3db5c9ebe1e504a7670df.zip
Updates against mainline OE
git-svn-id: https://svn.o-hand.com/repos/poky@26 311d38ba-8fff-0310-9ca6-ca027cbcb966
Diffstat (limited to 'openembedded/packages/zaurus-updater/spitz')
-rwxr-xr-xopenembedded/packages/zaurus-updater/spitz/updater.sh26
1 files changed, 23 insertions, 3 deletions
diff --git a/openembedded/packages/zaurus-updater/spitz/updater.sh b/openembedded/packages/zaurus-updater/spitz/updater.sh
index 73aa12c9a..07d81b1bd 100755
--- a/openembedded/packages/zaurus-updater/spitz/updater.sh
+++ b/openembedded/packages/zaurus-updater/spitz/updater.sh
@@ -44,7 +44,6 @@ Cleanup(){
rm -f $VTMPNAME > /dev/null 2>&1
rm -f $MTMPNAME > /dev/null 2>&1
rm $CTRLPATH/* > /dev/null 2>&1
- rm $DATAPATH/* > /dev/null 2>&1
exit $1
}
trap 'Cleanup 1' 1 15
@@ -82,7 +81,7 @@ fi
### Check model ###
/sbin/writerominfo
MODEL=`cat /proc/deviceinfo/product`
-if [ "$MODEL" != "SL-C3000" ]
+if [ "$MODEL" != "SL-C3000" ] && [ "$MODEL" != "SL-C3100" ]
then
echo 'MODEL:'$MODEL
echo 'ERROR:Invalid model!'
@@ -92,6 +91,23 @@ then
done
fi
+### Check that we have a valid tar
+for TARNAME in gnu-tar GNU-TAR
+do
+ if [ -e $DATAPATH/$TARNAME ]
+ then
+ TARBIN=$DATAPATH/$TARNAME
+ fi
+done
+
+if [ ! -e $TARBIN ]; then
+ echo 'Please place a valid copy of tar as "gnu-tar" on your card'
+ echo 'Please reset'
+ while true
+ do
+ done
+fi
+
mkdir -p $TMPPATH > /dev/null 2>&1
cd $DATAPATH/
@@ -243,13 +259,17 @@ do
cd /hdd1
echo 'Now extracting...'
- gzip -dc $DATAPATH/$TARGETFILE | tar xf -
+ gzip -dc $DATAPATH/$TARGETFILE | $TARBIN xf -
if [ "$?" != "0" ]; then
echo "Error!"
exit "$?"
fi
echo 'Success!'
+
+ #This can be useful for debugging
+ #/bin/sh -i
+
# remount as RO
cd /
umount /hdd1