[Maemo] Moved the copy of the ressources from the installation into a launcher script

This commit is contained in:
Xawotihs
2011-01-06 20:17:34 +00:00
parent 6b3d1bcbc9
commit 5ea6c1b890
3 changed files with 31 additions and 8 deletions
+24
View File
@@ -0,0 +1,24 @@
#!/bin/sh -e
if grep -q /home/user/MyDocs /proc/mounts; then
# FAT partition mounted
mkdir -p /home/user/MyDocs/wagic
mkdir -p /home/user/MyDocs/wagic/Res
# Size used on the FAT partition
usedSize=`du -s /home/user/MyDocs/wagic/Res | awk '{print $1}'`
# Size needed on the FAT partition
dirSize=`du -s /home/user/wagic/Res | awk '{print $1}'`
# Size available on the FAT partition
avaSize=`df | grep /dev/mmcblk0p1 | awk '{print $4}'`
echo "$usedSize $dirSize $avaSize"
if [ $usedSize -lt 100 ]
then if [ $avaSize -gt $dirSize ]
then
echo "Copying resources on the FAT partition to ease customization"
cp -rf /home/user/wagic/Res/* /home/user/MyDocs/wagic/Res
fi
fi
fi
./wagic
exit 0