On Thu, 17 Aug 2006 18:32:55 +0200, Hisham Muhammad <[EMAIL PROTECTED]> wrote:I have some trouble with my implementation as some scripts are passed arguments for programs that it will run. These options aren't in the option list, which causes getopt to bail out. An example is SandboxInstall, which has "make -f 'Makefile'" (without the double qoutes) late in the option string, and as -f isn't in the option list for SandboxInstall getopt return an error. I there's a workaround that needs a little fix before it works and that is to end all options to (in the example above) SandboxInstall with '--', but then all consecutie strings are embedded in qoutes, i.e. "'make' '-f' ''Makefile''", which makes the installation die with "zsh: command not found: 'make'" (or if it was "'make' no such file or directory", I don't remember atm, but it doesn't matter that much). The problem is the quotes. Is it possible to send the entire "make -f..." as one argument using quotes when passing it, and if so, maybe strip the single quotes added by getopt. Maybe there's an easier way to remove the single quotes?On 8/17/06, Jonas Karlsson <[EMAIL PROTECTED]> wrote:On Wed, 16 Aug 2006 22:33:31 +0200, Hisham Muhammad <[EMAIL PROTECTED]>wrote:Oh, I assumed you would use getopts. If they're roughly equivalent, I think using the bash builtin is the best option, so that, e.g. a broken util-linux wouldn't stop SymlinkProgram from running.Ok, I will use the util-linux version as the bash version isn't as powerful. Ofcourse I'll keep the old implementation as fallback, for when util-linux is broken.
Anyone have an idea on how to proceed? -- /Jonas PS. patch for new version of OptionParser attached Using Opera's revolutionary e-mail client: http://www.opera.com/mail/
getopt.patch
Description: Binary data
_______________________________________________ gobolinux-devel mailing list gobolinux-devel@lists.gobolinux.org http://lists.gobolinux.org/mailman/listinfo/gobolinux-devel