tomaz/appledoc — Issue #177: New bugs with command line args in bash script
Author: drekka
Created: 2012-01-23 13:18:55+00:00
State: open

Hi Tomaz

I pulled and built appledoc yesterday and it seems to be having some new problems with the command line args when I run from within a script. The weird thing being that if I cut and paste the assembled command and execute normally, it works just fine. Here's the relevant section of the script:

DC_APPLEDOC_CMD="appledoc --ignore .m -o \"$DC_BUILD_DIR/appledoc\" -p \"$DC_PROJECT_NAME\" -v \"$DC_CURRENT_PROJECT_VERSION\" -c \"$DC_COMPANY\" --company-id \"$DC_COMPANY_ID\" --install-docset --keep-intermediate-files --keep-undocumented-objects --keep-undocumented-members $DC_SRC"
echo Appledoc command: $DC_APPLEDOC_CMD
$DC_APPLEDOC_CMD

The first problem appears to be with the $DC_COMPANY variable. If it has a space it appears that, even with quotes, appledoc is breaking it up and getting confused, treating it's contents as new arguments.

The second problem appears to be that the $DC_SRC doesn't like quotes around it.

But as I said, if I run this it won't work, but if I cut and paste the echoed command, it works just fine.

So I'm having a few problems working this out :-)