# This deco extension unpacks .msa disk images. # .msa disk images are created by the Magic Shadow Archiver on Atari # 16-bit platforms (ST, Falcon etc.). As long as the .msa file is # intact and the disk image has a recognisable FAT filesystem on it # (which is untrue for some games, demos and "CD" disks) then the files # should be unpacked OK. # Dependencies: # msa >= 0.1.0 http://hatari.sourceforge.net/files/msa-0.1.0.tar.gz # mtools (tested on mcopy version 3.9.9) # deco count_files function decompress() { msa "${1}" >/dev/null 2>&1 # Convert .msa to .st success="$?" # 1 = converted .msa->.st 0 = other way beforefiles="`count_files .`" # keep a record of how many files we have if [ "x${success}" = "x1" ] # shouldn't need "x${...}" but just in case then MTOOLS_SKIP_CHECK=1 mcopy -i "${Main_name}.st" \ -s -p -n ${Verbose+-v} ::. . eval "case \`count_files .\` in ${beforefiles}) exit 1 ;; # mtools succeeds even if no files were esac" # extracted, so we signal an error else exit 1 # msa not successfully converted, error fi }