Hi,

I'm trying to create a script to auto generate the fpdoc description
(*.xml) files, but I have no idea how the regex stuff works!  Could
somebody help me please?

This is what I have so far...  in a myscript.sh file under Linux.

The first 'sed'  expression was copied from a google search, but I
think it was for .NET or something and doesn't work here.  :-(  As you
can guess I know nothing of regex. I just looks like lots of cursing
to me! ;-)
I'm considering writing a Free Pascal console app to do this, it's a
lot damn easier than figuring out this regex stuff.


---------  Copy  --------------------
#!/bin/sh

PackageName=OPF
XMLBaseDir=./xml
PasSrcDir=../Sources/OPF

## create the output directory
mkdir -p $XMLBaseDir/$PackageName

# process *.pas files and create makeskel line
for f in `find $PasSrcDir/ -type f -name *.pas`; do

  ShortFile=`echo $f | sed -e 's/\/([^/]+)$#//g' -e 's/\.pas\b//g'`
  echo $ShortFile

# this is to test the output line. Remove echo to execute makeskel
#echo  makeskel --package=$PackageName
--output=$XMLBaseDir/$PackageName/$ShortFile.xml
--input="'-Fi$PasSrcDir $f'"

done

exit 0
---------   END  --------------------


Regards,
  - Graeme -


_______________________________________________
fpGUI - a cross-platform Free Pascal GUI toolkit
http://opensoft.homeip.net/fpgui/

_________________________________________________________________
     To unsubscribe: mail [EMAIL PROTECTED] with
                "unsubscribe" as the Subject
   archives at http://www.lazarus.freepascal.org/mailarchives

Reply via email to