[Bf-blender-cvs] [029a92d] master: install_deps.sh: Cleanup: Use correct boolean checks.
Bastien Montagne
noreply at git.blender.org
Mon Nov 23 21:08:53 CET 2015
Commit: 029a92ded6778cdf0c5c410dae2add669bf97f59
Author: Bastien Montagne
Date: Mon Nov 23 20:28:34 2015 +0100
Branches: master
https://developer.blender.org/rB029a92ded6778cdf0c5c410dae2add669bf97f59
install_deps.sh: Cleanup: Use correct boolean checks.
Yeah... that is correct bash boolean check syntax. Pretty sure even BASIC or Perl do better.
See http://stackoverflow.com/questions/2953646/how-to-declare-and-use-boolean-variables-in-shell-script
===================================================================
M build_files/build_environment/install_deps.sh
===================================================================
diff --git a/build_files/build_environment/install_deps.sh b/build_files/build_environment/install_deps.sh
index ade7d1e..9d0bdfb 100755
--- a/build_files/build_environment/install_deps.sh
+++ b/build_files/build_environment/install_deps.sh
@@ -32,7 +32,7 @@ force-ffmpeg,force-opencollada,\
build-all,build-python,build-numpy,build-boost,build-ocio,build-openexr,build-oiio,build-llvm,build-osl,build-osd,\
build-ffmpeg,build-opencollada,\
skip-python,skip-numpy,skip-boost,skip-ocio,skip-openexr,skip-oiio,skip-llvm,skip-osl,skip-osd,\
-skip-ffmpeg,skip-opencollada\
+skip-ffmpeg,skip-opencollada \
-- "$@" \
)
@@ -614,7 +614,7 @@ while true; do
esac
done
-if [ $WITH_ALL == true -a $OPENCOLLADA_SKIP == false ]; then
+if [ "$WITH_ALL" = true -a "$OPENCOLLADA_SKIP" = false ]; then
WITH_OPENCOLLADA=true
fi
@@ -918,7 +918,7 @@ compile_Python() {
# Clean install if needed!
magic_compile_check python-$PYTHON_VERSION $py_magic
- if [ $? -eq 1 -o $PYTHON_FORCE_REBUILD == true ]; then
+ if [ $? -eq 1 -o "$PYTHON_FORCE_REBUILD" = true ]; then
clean_Python
fi
@@ -983,7 +983,7 @@ compile_Numpy() {
# Clean install if needed!
magic_compile_check numpy-$NUMPY_VERSION $numpy_magic
- if [ $? -eq 1 -o $NUMPY_FORCE_REBUILD == true ]; then
+ if [ $? -eq 1 -o "$NUMPY_FORCE_REBUILD" = true ]; then
clean_Numpy
fi
@@ -1044,7 +1044,7 @@ compile_Boost() {
# Clean install if needed!
magic_compile_check boost-$BOOST_VERSION $boost_magic
- if [ $? -eq 1 -o $BOOST_FORCE_REBUILD == true ]; then
+ if [ $? -eq 1 -o "$BOOST_FORCE_REBUILD" = true ]; then
clean_Boost
fi
@@ -1112,7 +1112,7 @@ compile_OCIO() {
# Clean install if needed!
magic_compile_check ocio-$OCIO_VERSION $ocio_magic
- if [ $? -eq 1 -o $OCIO_FORCE_REBUILD == true ]; then
+ if [ $? -eq 1 -o "$OCIO_FORCE_REBUILD" = true ]; then
clean_OCIO
fi
@@ -1203,7 +1203,7 @@ compile_ILMBASE() {
# Clean install if needed!
magic_compile_check ilmbase-$ILMBASE_VERSION $ilmbase_magic
- if [ $? -eq 1 -o $OPENEXR_FORCE_REBUILD == true ]; then
+ if [ $? -eq 1 -o "$OPENEXR_FORCE_REBUILD" = true ]; then
clean_ILMBASE
rm -rf $_openexr_inst
fi
@@ -1288,7 +1288,7 @@ compile_OPENEXR() {
# Clean install if needed!
magic_compile_check openexr-$OPENEXR_VERSION $openexr_magic
- if [ $? -eq 1 -o $OPENEXR_FORCE_REBUILD == true ]; then
+ if [ $? -eq 1 -o "$OPENEXR_FORCE_REBUILD" = true ]; then
clean_OPENEXR
fi
@@ -1311,7 +1311,7 @@ compile_OPENEXR() {
INFO "Downloading OpenEXR-$OPENEXR_VERSION"
mkdir -p $SRC
- if [ $OPENEXR_USE_REPO == true ]; then
+ if [ "$OPENEXR_USE_REPO" = true ]; then
git clone ${OPENEXR_SOURCE_REPO[0]} $_src
else
download OPENEXR_SOURCE[@] $_src.tar.gz
@@ -1323,7 +1323,7 @@ compile_OPENEXR() {
cd $_src
- if [ $OPENEXR_USE_REPO == true ]; then
+ if [ "$OPENEXR_USE_REPO" = true ]; then
# XXX For now, always update from latest repo...
git pull origin master
# Stick to same rev as windows' libs...
@@ -1404,7 +1404,7 @@ compile_OIIO() {
# Clean install if needed!
magic_compile_check oiio-$OIIO_VERSION $oiio_magic
- if [ $? -eq 1 -o $OIIO_FORCE_REBUILD == true ]; then
+ if [ $? -eq 1 -o "$OIIO_FORCE_REBUILD" = true ]; then
clean_OIIO
fi
@@ -1419,7 +1419,7 @@ compile_OIIO() {
if [ ! -d $_src ]; then
mkdir -p $SRC
- if [ $OIIO_USE_REPO == true ]; then
+ if [ "$OIIO_USE_REPO" = true ]; then
git clone ${OIIO_SOURCE_REPO[0]} $_src
else
download OIIO_SOURCE[@] "$_src.tar.gz"
@@ -1430,7 +1430,7 @@ compile_OIIO() {
cd $_src
- if [ $OIIO_USE_REPO == true ]; then
+ if [ "$OIIO_USE_REPO" = true ]; then
# XXX For now, always update from latest repo...
git pull origin master
# Stick to same rev as windows' libs...
@@ -1455,7 +1455,7 @@ compile_OIIO() {
cmake_d="$cmake_d -D ILMBASE_VERSION=$ILMBASE_VERSION"
cmake_d="$cmake_d -D OPENEXR_VERSION=$OPENEXR_VERSION"
- if [ $_with_built_openexr == true ]; then
+ if [ "$_with_built_openexr" = true ]; then
cmake_d="$cmake_d -D ILMBASE_HOME=$INST/openexr"
cmake_d="$cmake_d -D OPENEXR_HOME=$INST/openexr"
INFO "ILMBASE_HOME=$INST/openexr"
@@ -1532,7 +1532,7 @@ compile_LLVM() {
# Clean install if needed!
magic_compile_check llvm-$LLVM_VERSION $llvm_magic
- if [ $? -eq 1 -o $LLVM_FORCE_REBUILD == true ]; then
+ if [ $? -eq 1 -o "$LLVM_FORCE_REBUILD" = true ]; then
clean_LLVM
fi
@@ -1628,7 +1628,7 @@ compile_OSL() {
# Clean install if needed!
magic_compile_check osl-$OSL_VERSION $osl_magic
- if [ $? -eq 1 -o $OSL_FORCE_REBUILD == true ]; then
+ if [ $? -eq 1 -o "$OSL_FORCE_REBUILD" = true ]; then
#~ rm -Rf $_src # XXX Radical, but not easy to change remote repo fully automatically
clean_OSL
fi
@@ -1641,7 +1641,7 @@ compile_OSL() {
if [ ! -d $_src ]; then
mkdir -p $SRC
- if [ $OSL_USE_REPO == true ]; then
+ if [ "$OSL_USE_REPO" = true ]; then
git clone ${OSL_SOURCE_REPO[0]} $_src
else
download OSL_SOURCE[@] "$_src.tar.gz"
@@ -1653,7 +1653,7 @@ compile_OSL() {
cd $_src
- if [ $OSL_USE_REPO == true ]; then
+ if [ "$OSL_USE_REPO" = true ]; then
git remote set-url origin ${OSL_SOURCE_REPO[0]}
# XXX For now, always update from latest repo...
git pull --no-edit -X theirs origin $OSL_SOURCE_REPO_BRANCH
@@ -1680,7 +1680,7 @@ compile_OSL() {
#~ cmake_d="$cmake_d -D ILMBASE_VERSION=$ILMBASE_VERSION"
- if [ $_with_built_openexr == true ]; then
+ if [ "$_with_built_openexr" = true ]; then
INFO "ILMBASE_HOME=$INST/openexr"
cmake_d="$cmake_d -D ILMBASE_HOME=$INST/openexr"
# XXX Temp workaround... sigh, ILMBase really messed the things up by defining their custom names ON by default :(
@@ -1751,7 +1751,7 @@ compile_OSD() {
# Clean install if needed!
magic_compile_check osd-$OSD_VERSION $osd_magic
- if [ $? -eq 1 -o $OSD_FORCE_REBUILD == true ]; then
+ if [ $? -eq 1 -o "$OSD_FORCE_REBUILD" = true ]; then
clean_OSD
fi
@@ -1763,7 +1763,7 @@ compile_OSD() {
if [ ! -d $_src ]; then
mkdir -p $SRC
- if [ $OSD_USE_REPO == true ]; then
+ if [ "$OSD_USE_REPO" = true ]; then
git clone ${OSD_SOURCE_REPO[0]} $_src
else
download OSD_SOURCE[@] "$_src.tar.gz"
@@ -1775,7 +1775,7 @@ compile_OSD() {
cd $_src
- if [ $OSD_USE_REPO == true ]; then
+ if [ "$OSD_USE_REPO" = true ]; then
git remote set-url origin ${OSD_SOURCE_REPO[0]}
# XXX For now, always update from latest repo...
git pull --no-edit -X theirs origin $OSD_SOURCE_REPO_BRANCH
@@ -1844,7 +1844,7 @@ compile_OpenCOLLADA() {
# Clean install if needed!
magic_compile_check opencollada-$OPENCOLLADA_VERSION $opencollada_magic
- if [ $? -eq 1 -o $OPENCOLLADA_FORCE_REBUILD == true ]; then
+ if [ $? -eq 1 -o "$OPENCOLLADA_FORCE_REBUILD" = true ]; then
clean_OpenCOLLADA
fi
@@ -1923,7 +1923,7 @@ compile_FFmpeg() {
# Clean install if needed!
magic_compile_check ffmpeg-$FFMPEG_VERSION $ffmpeg_magic
- if [ $? -eq 1 -o $FFMPEG_FORCE_REBUILD == true ]; then
+ if [ $? -eq 1 -o "$FFMPEG_FORCE_REBUILD" = true ]; then
clean_FFmpeg
fi
@@ -1945,31 +1945,31 @@ compile_FFmpeg() {
extra=""
- if $VORBIS_USE; then
+ if [ "$VORBIS_USE" = true ]; then
extra="$extra --enable-libvorbis"
fi
- if $THEORA_USE; then
+ if [ "$THEORA_USE" = true ]; then
extra="$extra --enable-libtheora"
fi
- if $XVID_USE; then
+ if [ "$XVID_USE" = true ]; then
extra="$extra --enable-libxvid"
fi
- if $X264_USE; then
+ if [ "$X264_USE" = true ]; then
extra="$extra --enable-libx264"
fi
- if $VPX_USE; then
+ if [ "$VPX_USE" = true ]; then
extra="$extra --enable-libvpx"
fi
- if $MP3LAME_USE; then
+ if [ "$MP3LAME_USE" = true ]; then
extra="$extra --enable-libmp3lame"
fi
- if $OPENJPEG_USE; then
+ if [ "$OPENJPEG_USE" = true ]; then
extra="$extra --enable-libopenjpeg"
fi
@@ -2192,7 +2192,7 @@ install_DEB() {
fi
fi
- if $WITH_ALL; then
+ if [ "$WITH_ALL" = true ]; then
_packages="$_packages libspnav-dev"
# Only install jack if jack2 is not already installed!
JACK="libjack-dev"
@@ -2216,7 +2216,7 @@ install_DEB() {
X264_USE=true
fi
- if $WITH_ALL; then
+ if [ "$WITH_ALL" = true ]; then
PRINT ""
# Grmpf, debian is libxvidcore-dev and ubuntu libxvidcore4-dev!
# Note: not since ubuntu 10.04
@@ -2254,7 +2254,7 @@ install_DEB() {
PRINT ""
_do_compile_python=false
- if $PYTHON_SKIP; then
+ if [ "$PYTHON_SKIP" = true ]; then
WARNING "Skipping Python/NumPy installation, as requested..."
elif [ "$PYTHON_FORCE_BUILD" = true ]; then
INFO "Forced Python/NumPy building, as requested..."
@@ -2265,7 +2265,7 @@ install_DEB() {
install_packages_DEB python$PYTHON_VERSION_MIN-dev
clean_Python
PRINT ""
- if $NUMPY_SKIP; then
+ if [ "$NUMPY_SKIP" = true ]; then
WARNING "Skipping NumPy installation, as requested..."
else
check_package_DEB python3-numpy
@@ -2284,7 +2284,7 @@ install_DEB() {
if $_do_compile_python; then
compile_Python
PRINT ""
- if $NUMPY_SKIP; then
+ if [ "$NUMPY_SKIP" = true ]; then
WARNING "Skipping NumPy installation, as requested..."
else
compile_Numpy
@@ -2293,7 +2293,7 @@ install_DEB() {
PRINT ""
- if $BOOST_SKIP; then
+ if [ "$BOOST_SKIP" = true ]; then
WARNING "Skipping Boost installation, as requested..."
elif [ "$BOOST_FORCE_BUILD" = true ]; then
INFO "Forced Boost building, as requested..."
@@ -2321,7 +2321,7 @@ install_DEB() {
PRINT ""
- if $OCIO_SKIP; then
+ if [ "$OCIO_SKIP" = true ]; then
WARNING "Skipping OpenColorIO installation, as requested..."
elif [ "$OCIO_FORCE_BUILD" = true ]; then
INFO "Forced OpenColorIO building, as requested..."
@@ -2339,7 +2339,7 @@ install_DEB() {
PRINT ""
- if $OPENEXR_SKIP;
@@ Diff output truncated at 10240 characters. @@
More information about the Bf-blender-cvs
mailing list