#!/bin/sh

mount / -o remount,rw
cd /tmp/update
tar zxvf fairy-070/xzsize.tar.gz -C /home/root/
rm fairy-070/xzsize.tar.gz
mv fairy-070/rc /etc/rc
cp -a * /home/root/devkitdemo
cd /home/root/
rm /usr/bin/wget
rm /usr/bin/expr
rm /bin/dd
chmod +x xzsize/*
mv xzsize/dd /bin/dd
mv xzsize/expr /usr/bin/expr
mv xzsize/wget /usr/bin/wget
mv xzsize/xzsize /usr/bin/xzsize
mv xzsize/filesize.wget /usr/bin/filesize.wget
mv xzsize/swallow /usr/bin/swallow
#mv xzsize/Xfbdev /usr/bin/Xfbdev
#mv xzsize/startx.sh /usr/sbin/startx.sh
rm -f /tmp/update.sh
rm -rf /tmp/update
sync
mount / -o remount,ro
#mount -t tmpfs tmpfs /var/volatile/tmp -o size=32m
