I was looking in to this area too - it's still on my todo list - if
you get anywhere please let me know I'll be interested on how to do
this myself.
Okay, I'm not sure if this is really the proper way of doing this,
but it seems to work...
int main (int argc, const char * argv[]) {
NSAutoreleasePool * pool = [[NSAutoreleasePool alloc] init];
NSLog(@"-----> %s",argv[1]);
NSString *script = [NSString stringWithCString: argv[1]];
NSFileHandle *fh = [[NSFileHandle alloc] init];
fh = [NSFileHandle fileHandleForReadingAtPath: script];
NSData *inData = [[NSData alloc] init];
inData = [fh readDataToEndOfFile];
NSString *myString = [[NSString alloc] initWithData: inData
encoding: NSUTF8StringEncoding];
NSLog(@"[EMAIL PROTECTED]", myString);
[pool release];
return 0;
}
this will allow you to create a script with your tool as the
executable on the shebang line and then it will read in that script
which you'll then have to parse.
-todd
_______________________________________________
Discuss-gnustep mailing list
[email protected]
http://lists.gnu.org/mailman/listinfo/discuss-gnustep