From: vsr Date: Mon, 19 Oct 2009 19:17:21 +0000 (+0000) Subject: Improvement for docutils: simplify code for parsing of bin tools X-Git-Tag: V5_1_3~38 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=7d2ef204466df64ddcd7d5732ccbfebacf275c7b;p=tools%2Finstall.git Improvement for docutils: simplify code for parsing of bin tools --- diff --git a/config_files/docutils-0.6.0.sh b/config_files/docutils-0.6.0.sh index 563af09..2d3fd27 100755 --- a/config_files/docutils-0.6.0.sh +++ b/config_files/docutils-0.6.0.sh @@ -73,55 +73,14 @@ cd ${PRODUCT_SRC_DIR} ; python setup.py install --prefix=${PRODUCT_DIR} cd ${PRODUCT_DIR}/bin; -sed -e "s%#\!.*python%#\!/usr/bin/env python%" rst2latex.py > _rst2latex.py -mv -f _rst2latex.py rst2latex.py -chmod a+x rst2latex.py -ln -sf rst2latex.py rst2latex - -sed -e "s%#\!.*python%#\!/usr/bin/env python%" rst2html.py > _rst2html.py -mv -f _rst2html.py rst2html.py -chmod a+x rst2html.py -ln -sf rst2html.py rst2html - -sed -e "s%#\!.*python%#\!/usr/bin/env python%" rst2newlatex.py > _rst2newlatex.py -mv -f _rst2newlatex.py rst2newlatex.py -chmod a+x rst2newlatex.py -ln -sf rst2newlatex.py rst2newlatex - -sed -e "s%#\!.*python%#\!/usr/bin/env python%" rst2pseudoxml.py > _rst2pseudoxml.py -mv -f _rst2pseudoxml.py rst2pseudoxml.py -chmod a+x rst2pseudoxml.py -ln -sf rst2pseudoxml.py rst2pseudoxml - -sed -e "s%#\!.*python%#\!/usr/bin/env python%" rst2s5.py > _rst2s5.py -mv -f _rst2s5.py rst2s5.py -chmod a+x rst2s5.py -ln -sf rst2s5.py rst2s5 - -sed -e "s%#\!.*python%#\!/usr/bin/env python%" rst2xml.py > _rst2xml.py -mv -f _rst2xml.py rst2xml.py -chmod a+x rst2xml.py -ln -sf rst2xml.py rst2xml - -sed -e "s%#\!.*python%#\!/usr/bin/env python%" rst2man.py > _rst2man.py -mv -f _rst2man.py rst2man.py -chmod a+x rst2man.py -ln -sf rst2man.py rst2man - -sed -e "s%#\!.*python%#\!/usr/bin/env python%" rst2odt_prepstyles.py > _rst2odt_prepstyles.py -mv -f _rst2odt_prepstyles.py rst2odt_prepstyles.py -chmod a+x rst2odt_prepstyles.py -ln -sf rst2odt_prepstyles.py rst2odt_prepstyles - -sed -e "s%#\!.*python%#\!/usr/bin/env python%" rst2odt.py > _rst2odt.py -mv -f _rst2odt.py rst2odt.py -chmod a+x rst2odt.py -ln -sf rst2odt.py rst2odt - -sed -e "s%#\!.*python%#\!/usr/bin/env python%" rstpep2html.py > _rstpep2html.py -mv -f _rstpep2html.py rstpep2html.py -chmod a+x rstpep2html.py -ln -sf rstpep2html.py rstpep2html +scripts=`find . -name "*.py" -exec basename {} ";" | awk -F. '{print $1}'` +for f in X $scripts ; do + if test "${f}" == "X" ; then continue ; fi + sed -e "s%#\!.*python%#\!/usr/bin/env python%" ${f}.py > _${f}.py + mv -f _${f}.py ${f}.py + chmod a+x ${f}.py + ln -sf ${f}.py ${f} +done # remove sources and temporary files after building if [ ${REMOVE_SRC_TMP} == "TRUE" ] ; then