[Lazarus] Using the "build_html.sh" script on Mac OS X doesn't work [solution inside]

Henry Vermaak henry.vermaak at gmail.com
Wed Oct 15 17:10:41 CEST 2008


2008/10/15 Vincent Snijders <vsnijders at vodafonevast.nl>:
> John Stoneham schreef:
>> Well, I think I've fixed the script with two simple lines.
>>
>> The original build_lcl_html.sh (and build_gtkintf_html.sh as well) have
>> the following around line 30 or so:
>> -----------------------------------
>> # create description file list
>> DescrFiles=''
>> for unit in $UnitList; do
>>   ShortFile=`echo $unit | sed -e 's/\.pp\b//g' -e 's/\.pas\b//g'`
>>   DescrFiles="$DescrFiles --descr=../$XMLSrcDir$ShortFile.xml"
>> done
>> -----------------------------------
>>
>> ShortFile is the problem. It contains the extension of the unit files,
>> however the actual .xml filenames don't. So I added the following two
>> lines to remove either .pp or .pas extension, and the documentation is
>> now built with the script on OS X:
>> -----------------------------------
>> # create description file list
>> DescrFiles=''
>> for unit in $UnitList; do
>>   ShortFile=`echo $unit | sed -e 's/\.pp\b//g' -e 's/\.pas\b//g'`
>>   ShortFile=${ShortFile%.pp}
>>   ShortFile=${ShortFile%.pas}
>>   DescrFiles="$DescrFiles --descr=../$XMLSrcDir$ShortFile.xml"
>> done
>> -----------------------------------
>
> Maybe sed works differently on your computer, as far as I can tell, the sed -e
> command is there to strip the .pp or .pas extentsion.

yes, maybe it's getting confused by the multiple -e.  have you tried
sed 's/\(\.pp\|\.pas\)\b//g'?  that sed should probably only run once,
too (on the output of the ls).

henry



More information about the Lazarus mailing list