#!/bin/bash -noprofile
####################################################################################
-# File : sphinx-1.0.7.sh
+# File : Sphinx.sh
# Created : Thu Dec 18 12:01:00 2002
# Author : Vadim SANDLER, Open CASCADE SAS (vadim.sandler@opencascade.com)
# Project : SALOME
# Module : Installation Wizard
-# Copyright : 2002-2008 CEA
+# Copyright : 2002-2012 CEA
#
# This script is the part of the SALOME installation procedure.
#
# build sources
test -z ${SINGLE_DIR} && makedir ${PRODUCT_DIR} || mkdir -p ${PRODUCT_DIR}
-mkdir ${PRODUCT_DIR}/bin
-mkdir ${PRODUCT_DIR}/lib
-mkdir ${PRODUCT_DIR}/lib/python${PYTHON_VERSION}
-mkdir ${PRODUCT_DIR}/lib/python${PYTHON_VERSION}/site-packages
+mkdir -p ${PRODUCT_DIR}/bin
+mkdir -p ${PRODUCT_DIR}/lib/python${PYTHON_VERSION}/site-packages
-export PYTHONPATH=${INST_ROOT}/${SINGLE_DIR:-${PRODUCT}}/lib/python${PYTHON_VERSION}/site-packages:${PYTHONPATH}
-export PATH=${INST_ROOT}/${SINGLE_DIR:-${PRODUCT}}/bin:${PATH}
+export PYTHONPATH=${PRODUCT_DIR}/lib/python${PYTHON_VERSION}/site-packages:${PYTHONPATH}
+export PATH=${PRODUCT_DIR}/bin:${PATH}
export PYTHONDONTWRITEBYTECODE=
cd ${PRODUCT_DIR}/bin;
-sed -e "s%#\!.*python%#\!/usr/bin/env python%" easy_install > _easy_install
-mv -f _easy_install easy_install
-chmod a+x easy_install
-
-sed -e "s%#\!.*python%#\!/usr/bin/env python%" easy_install-${PYTHON_VERSION} > _easy_install-${PYTHON_VERSION}
-mv -f _easy_install-${PYTHON_VERSION} easy_install-${PYTHON_VERSION}
-chmod a+x easy_install-${PYTHON_VERSION}
-
-sed -e "s%#\!.*python%#\!/usr/bin/env python%" pygmentize > _pygmentize
-mv -f _pygmentize pygmentize
-chmod a+x pygmentize
-
-sed -e "s%#\!.*python%#\!/usr/bin/env python%" sphinx-build > _sphinx-build
-mv -f _sphinx-build sphinx-build
-chmod a+x sphinx-build
-
-sed -e "s%#\!.*python%#\!/usr/bin/env python%" sphinx-quickstart > _sphinx-quickstart
-mv -f _sphinx-quickstart sphinx-quickstart
-chmod a+x sphinx-quickstart
-
-sed -e "s%#\!.*python%#\!/usr/bin/env python%" sphinx-autogen > _sphinx-autogen
-mv -f _sphinx-autogen sphinx-autogen
-chmod a+x sphinx-autogen
+scripts=`find . -type f`
+for f in X $scripts ; do
+ if test "${f}" == "X" ; then continue ; fi
+ sed -i "s%#\!.*python%#\!/usr/bin/env python%" ${f}
+done
cd ${PRODUCT_DIR}