Author: wyoung
Date: Thu Mar 16 03:07:30 2006
New Revision: 1253

URL: http://svn.gna.org/viewcvs/mysqlpp?rev=1253&view=rev
Log:
Made mktxt script smart enough to fall back to *.h when it can't find a
*.cpp file to correspond to the *.txt file it is given.  This is needed
to make a text version of the new stock.h example header.

Modified:
    branches/v2.1-bakefile/doc/userman/Makefile
    branches/v2.1-bakefile/doc/userman/mktxt

Modified: branches/v2.1-bakefile/doc/userman/Makefile
URL: 
http://svn.gna.org/viewcvs/mysqlpp/branches/v2.1-bakefile/doc/userman/Makefile?rev=1253&r1=1252&r2=1253&view=diff
==============================================================================
--- branches/v2.1-bakefile/doc/userman/Makefile (original)
+++ branches/v2.1-bakefile/doc/userman/Makefile Thu Mar 16 03:07:30 2006
@@ -18,8 +18,8 @@
 HTML_SS=html.xsl
 EX_TXT=cgi_image.txt custom1.txt custom2.txt custom3.txt custom4.txt \
                custom5.txt custom6.txt fieldinf1.txt load_file.txt \
-               resetdb.txt simple1.txt simple2.txt simple3.txt updel.txt \
-               util.txt
+               resetdb.txt simple1.txt simple2.txt simple3.txt stock.txt \
+               updel.txt util.txt
 
 
 ## ------------------------

Modified: branches/v2.1-bakefile/doc/userman/mktxt
URL: 
http://svn.gna.org/viewcvs/mysqlpp/branches/v2.1-bakefile/doc/userman/mktxt?rev=1253&r1=1252&r2=1253&view=diff
==============================================================================
--- branches/v2.1-bakefile/doc/userman/mktxt (original)
+++ branches/v2.1-bakefile/doc/userman/mktxt Thu Mar 16 03:07:30 2006
@@ -4,11 +4,16 @@
 # reformat the example programs so they can be xincluded directly into
 # the DocBook during XSLT processing.
 
-SRCFILE=`echo ../../examples/$1 | sed -e s/txt/cpp/`
+TXTFILE=$1
+SRCFILE=`echo ../../examples/$TXTFILE | sed -e s/\\\\.txt/.cpp/`
+if [ ! -e $SRCFILE ]
+then
+       SRCFILE=`echo ../../examples/$TXTFILE | sed -e s/\\\\.txt/.h/`
+fi
 CLINE=`grep -n '\*\*/' $SRCFILE |cut -f1 -d:`
-LINE=`echo $CLINE + 1 |bc`
+LINE=`echo $CLINE + 2 |bc`
 
-#echo Converting $SRCFILE to $1, starting at line $LINE...
+#echo Converting $SRCFILE to $TXTFILE, starting at line $LINE...
 
-expand -t4 $SRCFILE | tail -n +$LINE > $1
+expand -t4 $SRCFILE | tail -n +$LINE > $TXTFILE
 


_______________________________________________
Mysqlpp-commits mailing list
[email protected]
https://mail.gna.org/listinfo/mysqlpp-commits

Reply via email to