[CalendarServer-dev] Problem with run script on linux

Wilfredo Sánchez Vega wsanchez at wsanchez.net
Tue Feb 13 16:37:51 PST 2007


   What's -r?  It's not on OS X, so I don't think it's a portable  
option...

   Is xargs on Linux calling rm with an empty argument list?

	-wsv


On Feb 8, 2007, at 2:10 AM, Frank Strauß wrote:

> Andy Brook wrote:
>> I checked out the calendar server to try to get it running on
>> Slackware version 11.0. When I went to install it, the setup section
>> of the run script failed on trying to remove all the .pyc files for
>> the programs it was downloading. The way it's written, it will work
>> when there are actually files to remove, but the whole script will
>> fail out if the files are already missing.
>> The following patch makes this work correctly on Linux. I would think
>> it would still work as it should on OSX, but I don't have an OSX
>> machine to test with.
>> Other than this, the program works great on Linux, as long as  
>> extended
>> attributes are installed in the kernel.
>> -Andy Brook
>> --- run.orig 2007-02-07 13:50:35.000000000 -0500
>> +++ run     2007-02-07 13:50:18.000000000 -0500
>> @@ -216,7 +216,7 @@
>>   echo "Removing build directory ${path}/build..."
>>   rm -rf "${path}/build";
>>   echo "Removing pyc files from ${path}..."
>> -  find "${path}" -type f -name '*.pyc' -print0 | xargs -0 rm;
>> +  find "${path}" -type f -name '*.pyc' -print0 | xargs -0 rm -f;
>> }
>
> I observed the same issue and prefered this solution...
>
> -  find "${path}" -type f -name '*.pyc' -print0 | xargs -0 rm;
> +  find "${path}" -type f -name '*.pyc' -print0 | xargs -r -0 rm;
>
> :-)
> _______________________________________________
> calendarserver-dev mailing list
> calendarserver-dev at lists.macosforge.org
> http://lists.macosforge.org/mailman/listinfo/calendarserver-dev



More information about the calendarserver-dev mailing list