command
Submitted by Tim Sparg on Fri, 10/24/2008 - 21:01.
Hi all
i've been arbing around for awhile trying to get my head around the source code, and finally decided to make the plunge and submit something.
I've written a md5 checksum tool that runs in the jbourne shell. I know this isn't exactly i high priority type of thing to write, but i needed to start somewhere...
What i'm battling with at the moment is getting the CLI right.
ideally i want to have 2 distinct options
1. md5sum (-r) file1 file2 fileN
2. md5sum -c checkFile
I seem to be screwing up the syntax xml tho...
Have attached the source file for the command, any help would be much appreciated.
cheers
Tim
Attachment | Size |
---|---|
Md5sumCommand.java_.gz | 1.85 KB |
- Login to post comments
Committed
I have fixed a couple of problems in the code and syntax specification and committed your code.
Please take a look and try it out.
Thank you for this contribution!
Regards,
Levente
Hi Tim, it is a very good
Hi Tim,
it is a very good idea to start with something simple to get into JNode and a especially a Md5sumCommand is something useful too and we'll include for sure.
Regarding the source code, I'd like to point you to our coding style rules. To make it a full command I'd also ask you for a plugin descriptor as they're an essential part of JNode. Have a look at shell/descriptors/org.jnode.shell.command.xml for an example. You can supply your own descriptor or extend that one.
You also might want to submit a patch instead: If you use svn you can use "svn diff > md5.patch" in the jnode toplevel directory to create one.
Regarding your syntax problem I think a proper descriptor might already do the trick.
Thanks for the tips
Hi Peter
I will definitely look at the coding conventions and abide by them.
I did try and create a command descriptor
I edited the org.jnode.shell.command.xml file with the following xml, which i am sure is wrong!
Im pretty sure that this not only is incorrect, but also that i'm not even on the right path!