SQSH4OPT=$(find $OPT -type f -name squashfs4-tools.lzm | wc -l)
SQSH4LO=$(losetup -a | grep squashfs4-tools | wc -l)
SQSH4ROOT=$( ls /root | grep sqashfs4 | wc -l)
FILECHK=$(ls $INPUT | wc -l)
usage()
{
cat <<EOF
$SCRIPT /path/to/folder
=================================
.LZM SQUASHFS 4 MODULE CONVERTER
=================================
This script converts a folder of .lzm modules from squashfs3 to squashfs4. A new folder will be created with the name of the input folder and -converted on the end. The script requires squashfs4-tools and will sniff activated modules to see if it exists. Otherwise it will download (800Kb) the file from the slax repository. In this case an internet connection is required.
EOF
}
#check for zero input after script name
if [ $# -eq 0 ]; then
usage
exit 1
fi
#check that input directory exists
if [ -d $INPUT -a $FILECHK -ne 0 ]; then
echo "Located $INPUT folder"
else
echo
echo --------------------------------------------
echo "The folder you specified either does not exists"
wrote 21 hours ago [total posts: 833] [total posts: 833] [total posts: 833] [total posts: 833]
reply | report spam
Multiple module converter is now ready. You can convert every module in a directory and it's sub directories.
You can name the script whatever you like and put it in path /usr/bin
Usage: yourScript /path/to/module/folder
http://ibj.co.nz/main/slax/modconv-all
This script will check that input folder exists and has modules in it. It will then check if squashfs4-tools is activated or exists in slax optional folder. If not it will check for internet connection and then download and activate tools.
If required conditions are met it will convert all old modules into new squash4 ones and put them in a folder with the same name as your input with -converted appended to the folder name.
Next step is to make a module from all scripts and maybe a gui for some of them.