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

Vincent Snijders vsnijders at vodafonevast.nl
Wed Oct 15 15:54:10 CEST 2008


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.

Vincent



More information about the Lazarus mailing list