From b4a7122cacef647dbec3db5c9ebe1e504a7670df Mon Sep 17 00:00:00 2001 From: Richard Purdie Date: Tue, 20 Sep 2005 07:04:35 +0000 Subject: Updates against mainline OE git-svn-id: https://svn.o-hand.com/repos/poky@26 311d38ba-8fff-0310-9ca6-ca027cbcb966 --- .../packages/zaurus-updater/spitz/updater.sh | 26 +++++++++++++++++++--- 1 file changed, 23 insertions(+), 3 deletions(-) (limited to 'openembedded/packages/zaurus-updater/spitz') 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 -- cgit v1.2.3