while["$enough"="0"];do# loops until found something
if[[ -n `df | grep $tmp`]];then# we got it in df, find the space left
anotmp=`df | grep $tmp| sed "s~^\([^ ]*\) *\([^ ]*\) *\([^ ]*\) *\([^ ]*\) *\([^ ]*\) *\([^ ]*\)$~\4~"`# now we have a string, first item is free space in /
free=`echo$anotmp| sed "s~^\([^ ]*\) \(.*\)~\1~"`# get first space-delimited item
dcop --all-users amarok playlist popupMessage "You do not have squashfs support enabled. You need to have a patched kernel with squashfs. You can find more info about squashfs, and how to patch your kernel, here: http://tldp.org/HOWTO/SquashFS-HOWTO/"
rm -rf $WORK/mklivecd
fi
fi
mkdir $WORK/amarok.livecd/
mount -o loop -t squashfs $WORK/mklivecd/livecd/livecd.sqfs $WORK/amarok.livecd/
# gotta copy it locally so the user can add files to it
mkdir $WORK/amarok.live/
dcop --all-users amarok playlist shortStatusMessage "Copying files now. Please be patient, this step takes a long time."
dcop --all-users amarok playlist popupMessage "Copying done. To add music to the Amarok livecd, select the tracks you wish to add in the playlist, and select \"Add to livecd\" from the right click menu. Please do not add more than about 380 mb, as then the resulting ISO will be too large to fit on a CD-ROM. Once you are done, select Create Remastered CD. Enjoy!"