|
From: David L. <dl...@mu...> - 2005-06-24 14:44:53
|
Hi all, mkisofsCommand function is almost ready. Only space substitution is left to be done, but this task is not as trivial as it seems... you have to substitute all the spaces that ocur before the first = unescaped symbol (escaped with \\). Now, the function is able to deal with special chars such as =, \, \\, ", and others. I've maid a little script to test these features, making an iso out of four or five files with special characters on their names. If you want to test it, checkout/build the latest CVS version, and copy this script to the wrapper dir, where 'geniso' binary is located: #!/bin/bash touch "file with \\.dat" "file with \".dat" "file with \\\\.dat" \ "file with =.dat" cat > list <<EOF file with \.dat=file with \.dat file with ".dat=file with ".dat file with \\\\\\\\.dat=file with \\\\\\\\.dat file with \\\\=.dat=file with \\\\=.dat EOF ./geniso echo "Cleaning up..." rm "file with \\.dat" "file with \".dat" "file with \\\\.dat" \ "file with =.dat" list && echo "Success!" && exit echo "Failed!" An interactive session would be as follows (suppose we named the script runtest.sh): ./runtest.sh Input file: list <- you MUST enter list here Name of the ISO: test.iso ISO level: 3 Volume name: My Volume Name Publisher: The Enflame Project Preparer: David Lago ==== mkisofs command ==== mkisofs -graft-points -r -J -joliet-long -U -relaxed-filenames -L -allow-lowercase -max-iso9660-filenames -allow-multidot -iso-level 3 -V "My Volume Name" -publisher "The Enflame Project" -preparer "David Lago" -sys "Linux 2.6.11-gentoo-r11 i686" -appid "Enflame 0.1.1" -o test.iso "file with \\.dat=file with \\.dat" "file with \".dat=file with \".dat" "file with \\\\\\\\.dat=file with \\\\\\\\.dat" "file with \\=.dat=file with \\=.dat" Do you want to create that ISO? y Warning: creating filesystem that does not conform to ISO-9660. Warning: ISO-9660 filenames longer than 31 may cause buffer overflows in the OS.Total translation table size: 0 Total rockridge attributes bytes: 518 Total directory bytes: 0 Path table size(bytes): 10 Max brk space used 21000 48 extents written (0 Mb) Done! Cleaning up... Success! If you want to take a look at what files were created, as well as the list file (formatted file with pairs filename_in_ISO=filename_in_disk), comment the rm line on the script. For further info, read this funciton's comments in wrapper.h. Regards, David. -- David Lago <dl...@mu...> PGP key available at: http://pgp.mit.edu Personal Blizog: http://arcanelinux.org/blog/dlworld The Enflame Project: http://enflame.org |