*Bump*
Did some more work on this tonight, revamping the command line handling system like I wanted to. It's much more cleaner and easier to add hooks into the VP lib.
Note that when "specified directory" refers to the VP's directories, you use unix-style paths. That is, -ls /data/missions would show everything in the data/missions directory.
You _can_ use multiple commands. I don't know if that's evident from the below. So you could insert a directory and extract it with the same command line.
And of course, if you specify a nonexistent VP file and insert stuff into it, it will make a VP for you.
VPMagic 0.2:
'VPMagic' manages Volition VP files. It can extract and insert files.
USAGE: ./vpmagic [VP]... [OPTIONS]...
EXAMPLES:
./vpmagic root_fs2.vp -xa #Extract all files from 'root_fs2.vp'.
Output control:
-v, --verbose Display all status messages
Extraction:
-xa, --extract-all Extracts all VP contents to the specified dir(s)
-xd, --extract-dir Extracts contents of specfied directories to specified directory
Insertion:
-id, --insert-dirs Inserts directories (with files) into the VP root
-if, --insert-files Inserts files into the specified directory
Info:
-ls, --list-items Lists all items in the specified directories, or the VP root if none are specified
Known bugs/TODO:
- Dates show as pure timestamps in ls
- ls works if any of the first directories in the path are valid
- The binary is compiled for my AMD64. I think. I'm not sure what my default G++ flags are, and can't be arsed to figure out what exactly to add to make it compatible for everyone else. Which brings me to my next item...
- Figure out how to invoke other makefiles from a makefile.