[asterisk-commits] mvanbaak: trunk r130578 - in /trunk: build_tools/ doc/tex/ res/

SVN commits to the Asterisk project asterisk-commits at lists.digium.com
Sun Jul 13 18:14:03 CDT 2008


Author: mvanbaak
Date: Sun Jul 13 18:14:03 2008
New Revision: 130578

URL: http://svn.digium.com/view/asterisk?view=rev&rev=130578
Log:
Make all sed calls Posix sed compatible.
To make sure nobody commits script-modified files we first make a backup
of asterisk.tex, run the script, generate the pdf and / or html,
and put the original asterisk.tex back.
This will guard us for the stuff that happened before that someone committed 
a locally modified asterisk.tex, with changes done by this script.

(closes issue #13062)
Reported by: mvanbaak
Patches:
      sed_without-i-v3.diff uploaded by mvanbaak (license 7)
Tested by: mvanbaak

Feedback from Corydon. Thanks for taking the time to go through this.

Modified:
    trunk/build_tools/prep_tarball
    trunk/doc/tex/Makefile
    trunk/res/Makefile

Modified: trunk/build_tools/prep_tarball
URL: http://svn.digium.com/view/asterisk/trunk/build_tools/prep_tarball?view=diff&rev=130578&r1=130577&r2=130578
==============================================================================
--- trunk/build_tools/prep_tarball (original)
+++ trunk/build_tools/prep_tarball Sun Jul 13 18:14:03 2008
@@ -9,5 +9,10 @@
 make AWK=awk GREP=grep menuselect-tree
 
 VERSION=`cat .version`
-sed -i -e "s/ASTERISKVERSION/${VERSION}/" doc/tex/asterisk.tex
+# make backup of asterisk.tex because we are going to alter it
+cp asterisk.tex asterisk.tex.orig
+sed -e "s/ASTERISKVERSION/${VERSION}/" doc/tex/asterisk.tex > doc/tex/asterisk_local.tex
+mv asterisk_local.tex asterisk.tex
 cd doc/tex && rubber --pdf asterisk.tex && latex2html asterisk.tex
+# restore backup of asterisk.tex
+mv asterisk.tex.orig asterisk.tex

Modified: trunk/doc/tex/Makefile
URL: http://svn.digium.com/view/asterisk/trunk/doc/tex/Makefile?view=diff&rev=130578&r1=130577&r2=130578
==============================================================================
--- trunk/doc/tex/Makefile (original)
+++ trunk/doc/tex/Makefile Sun Jul 13 18:14:03 2008
@@ -24,7 +24,8 @@
 endif
 endif
 	@cp asterisk.tex asterisk.tex.orig
-	sed -i -e 's/ASTERISKVERSION/$(shell echo $(ASTERISKVERSION) | sed -e 's/\//\\\//g')/' asterisk.tex
+	@sed -e 's/ASTERISKVERSION/$(shell echo $(ASTERISKVERSION) | sed -e 's/\//\\\//g')/' asterisk.tex > asterisk_local.tex
+	@mv asterisk_local.tex asterisk.tex
 	@$(RUBBER) --pdf asterisk.tex
 	@mv asterisk.tex.orig asterisk.tex
 endif
@@ -38,7 +39,8 @@
 	@echo "** required for this to work.              ***"	
 	@echo "**********************************************"
 	@cp asterisk.tex asterisk.tex.orig
-	@sed -i -e 's/ASTERISKVERSION/$(ASTERISKVERSION)/' asterisk.tex
+	@sed -e 's/ASTERISKVERSION/$(ASTERISKVERSION)/' asterisk.tex > asterisk_local.tex
+	@mv asterisk_local.tex asterisk.tex
 	@latex2html asterisk.tex
 	@mv asterisk.tex.orig asterisk.tex
 

Modified: trunk/res/Makefile
URL: http://svn.digium.com/view/asterisk/trunk/res/Makefile?view=diff&rev=130578&r1=130577&r2=130578
==============================================================================
--- trunk/res/Makefile (original)
+++ trunk/res/Makefile Sun Jul 13 18:14:03 2008
@@ -44,7 +44,7 @@
 $(if $(filter res_ael_share,$(EMBEDDED_MODS)),modules.link,res_ael_share.so): ael/ael_lex.o ael/ael.tab.o ael/pval.o
 
 ael/ael_lex.c:
-	(cd ael; flex ael.flex; sed -i -e "/begin standard C headers/i#include \"asterisk.h\"" ael_lex.c)
+	(cd ael; flex ael.flex; sed -e "/begin standard C headers/i#include \"asterisk.h\"" ael_lex.c > zz; mv zz ael_lex.c)
 	(cd ael; sed 's@#if __STDC_VERSION__ >= 199901L@#if !defined __STDC_VERSION__ || __STDC_VERSION__ >= 199901L@' ael_lex.c > zz; mv zz ael_lex.c)
 
 ael/ael.tab.c ael/ael.tab.h:




More information about the asterisk-commits mailing list