4 SRC="$HOME/src/blender-deps"
8 THREADS=`cat /proc/cpuinfo | grep cores | uniq | sed -e "s/.*: *\(.*\)/\\1/"`
10 PYTHON_VERSION="3.3.0"
11 PYTHON_VERSION_MIN="3.3"
12 PYTHON_SOURCE="http://python.org/ftp/python/$PYTHON_VERSION/Python-$PYTHON_VERSION.tar.bz2"
14 BOOST_VERSION="1.51.0"
15 _boost_version_nodots=`echo "$BOOST_VERSION" | sed -r 's/\./_/g'`
16 BOOST_SOURCE="http://sourceforge.net/projects/boost/files/boost/$BOOST_VERSION/boost_$_boost_version_nodots.tar.bz2/download"
17 BOOST_VERSION_MIN="1.49"
20 OCIO_SOURCE="https://github.com/imageworks/OpenColorIO/tarball/v$OCIO_VERSION"
21 OCIO_VERSION_MIN="1.0"
24 OIIO_SOURCE="https://github.com/OpenImageIO/oiio/tarball/Release-$OIIO_VERSION"
25 OIIO_VERSION_MIN="1.1"
28 LLVM_VERSION_MIN="3.0"
30 # OSL needs to be compiled for now!
32 OSL_SOURCE="https://github.com/DingTo/OpenShadingLanguage/archive/blender-fixes.zip"
35 FFMPEG_SOURCE="http://ffmpeg.org/releases/ffmpeg-$FFMPEG_VERSION.tar.bz2"
36 FFMPEG_VERSION_MIN="0.7.6"
39 # FFMPEG optional libs.
58 # Switch to english language, else some things (like check_package_DEB()) won't work!
71 # Return 0 if $1 >= $2, else 1.
72 # $1 and $2 should be version numbers made of numbers only.
74 if [ $(echo -e "$1\n$2" | sort --version-sort | head --lines=1) = "$1" ]; then
81 # Return 0 if $1 is into $2 (e.g. 3.3.2 is into 3.3, but not 3.3.0 or 3.3.5), else 1.
82 # $1 and $2 should be version numbers made of numbers only.
83 # $1 should be at least as long as $2!
88 # Split both version numbers into their numeric elements.
96 if [ $count1 -ge $count2 ]; then
98 for (( i=0; $i < $count2; i++ ))
100 if [ $(( 10#${arr1[$i]} )) -ne $(( 10#${arr2[$i]} )) ]; then
112 if [ -f /etc/debian_version ]; then
114 elif [ -f /etc/redhat-release ]; then
116 elif [ -f /etc/SuSE-release ]; then
122 INFO "Ensuring $INST exists and is writable by us"
124 sudo chown $USER $INST
128 # Check whether the current package needs to be recompiled, based on a dummy file containing a magic number in its name...
129 magic_compile_check() {
130 if [ -f $INST/.$1-magiccheck-$2 ]; then
137 magic_compile_set() {
138 rm -f $INST/.$1-magiccheck-*
139 touch $INST/.$1-magiccheck-$2
143 # To be changed each time we make edits that would modify the compiled result!
146 # Clean install if needed!
147 magic_compile_check python-$PYTHON_VERSION $py_magic
148 if [ $? -eq 1 ]; then
149 rm -rf $INST/python-$PYTHON_VERSION
152 if [ ! -d $INST/python-$PYTHON_VERSION ]; then
153 INFO "Building Python-$PYTHON_VERSION"
157 if [ ! -d $SRC/Python-$PYTHON_VERSION ]; then
159 wget -c $PYTHON_SOURCE -P $SRC
161 INFO "Unpacking Python-$PYTHON_VERSION"
162 tar -C $SRC -xf $SRC/Python-$PYTHON_VERSION.tar.bz2
165 cd $SRC/Python-$PYTHON_VERSION
167 ./configure --prefix=$INST/python-$PYTHON_VERSION --enable-ipv6 \
168 --enable-loadable-sqlite-extensions --with-dbmliborder=bdb \
169 --with-computed-gotos --with-pymalloc
175 rm -f $INST/python-3.3
176 ln -s python-$PYTHON_VERSION $INST/python-3.3
178 magic_compile_set python-$PYTHON_VERSION $py_magic
182 INFO "Own Python-$PYTHON_VERSION is up to date, nothing to do!"
187 # To be changed each time we make edits that would modify the compiled result!
190 # Clean install if needed!
191 magic_compile_check boost-$BOOST_VERSION $boost_magic
192 if [ $? -eq 1 ]; then
193 rm -rf $INST/boost-$BOOST_VERSION
196 if [ ! -d $INST/boost-$BOOST_VERSION ]; then
197 INFO "Building Boost-$BOOST_VERSION"
201 if [ ! -d $SRC/boost-$BOOST_VERSION ]; then
202 INFO "Downloading Boost-$BOOST_VERSION"
204 wget -c $BOOST_SOURCE -O $SRC/boost-$BOOST_VERSION.tar.bz2
205 tar -C $SRC --transform "s,(.*/?)boost_1_[^/]+(.*),\1boost-$BOOST_VERSION\2,x" -xf $SRC/boost-$BOOST_VERSION.tar.bz2
208 cd $SRC/boost-$BOOST_VERSION
209 if [ ! -f $SRC/boost-$BOOST_VERSION/b2 ]; then
212 ./b2 -j$THREADS -a --with-system --with_filesystem --with-thread --with-regex --with-locale --with-date_time \
213 --prefix=$INST/boost-$BOOST_VERSION --disable-icu boost.locale.icu=off install
217 ln -s boost-$BOOST_VERSION $INST/boost
219 magic_compile_set boost-$BOOST_VERSION $boost_magic
223 INFO "Own Boost-$BOOST_VERSION is up to date, nothing to do!"
228 # To be changed each time we make edits that would modify the compiled result!
231 # Clean install if needed!
232 magic_compile_check ocio-$OCIO_VERSION $ocio_magic
233 if [ $? -eq 1 ]; then
234 rm -rf $INST/ocio-$OCIO_VERSION
237 if [ ! -d $INST/ocio-$OCIO_VERSION ]; then
238 INFO "Building OpenColorIO-$OCIO_VERSION"
242 if [ ! -d $SRC/OpenColorIO-$OCIO_VERSION ]; then
243 INFO "Downloading OpenColorIO-$OCIO_VERSION"
245 wget -c $OCIO_SOURCE -O $SRC/OpenColorIO-$OCIO_VERSION.tar.gz
247 INFO "Unpacking OpenColorIO-$OCIO_VERSION"
248 tar -C $SRC --transform "s,(.*/?)imageworks-OpenColorIO[^/]*(.*),\1OpenColorIO-$OCIO_VERSION\2,x" \
249 -xf $SRC/OpenColorIO-$OCIO_VERSION.tar.gz
252 cd $SRC/OpenColorIO-$OCIO_VERSION
253 # Always refresh the whole build!
254 if [ -d build ]; then
260 if file /bin/cp | grep -q '32-bit'; then
261 cflags="-fPIC -m32 -march=i686"
266 cmake -D CMAKE_BUILD_TYPE=Release \
267 -D CMAKE_PREFIX_PATH=$INST/ocio-$OCIO_VERSION \
268 -D CMAKE_INSTALL_PREFIX=$INST/ocio-$OCIO_VERSION \
269 -D CMAKE_CXX_FLAGS="$cflags" \
270 -D CMAKE_EXE_LINKER_FLAGS="-lgcc_s -lgcc" \
276 # Force linking against static libs
277 rm -f $INST/ocio-$OCIO_VERSION/lib/*.so*
279 # Additional depencencies
280 cp ext/dist/lib/libtinyxml.a $INST/ocio-$OCIO_VERSION/lib
281 cp ext/dist/lib/libyaml-cpp.a $INST/ocio-$OCIO_VERSION/lib
286 ln -s ocio-$OCIO_VERSION $INST/ocio
288 magic_compile_set ocio-$OCIO_VERSION $ocio_magic
292 INFO "Own OpenColorIO-$OCIO_VERSION is up to date, nothing to do!"
297 # To be changed each time we make edits that would modify the compiled result!
300 # Clean install if needed!
301 magic_compile_check oiio-$OIIO_VERSION $oiio_magic
302 if [ $? -eq 1 ]; then
303 rm -rf $INST/oiio-$OIIO_VERSION
306 if [ ! -d $INST/oiio-$OIIO_VERSION ]; then
307 INFO "Building OpenImageIO-$OIIO_VERSION"
311 if [ ! -d $SRC/OpenImageIO-$OIIO_VERSION ]; then
312 wget -c $OIIO_SOURCE -O "$SRC/OpenImageIO-$OIIO_VERSION.tar.gz"
314 INFO "Unpacking OpenImageIO-$OIIO_VERSION"
315 tar -C $SRC --transform "s,(.*/?)OpenImageIO-oiio[^/]*(.*),\1OpenImageIO-$OIIO_VERSION\2,x" \
316 -xf $SRC/OpenImageIO-$OIIO_VERSION.tar.gz
319 cd $SRC/OpenImageIO-$OIIO_VERSION
320 # Always refresh the whole build!
321 if [ -d build ]; then
327 if [ -d $INST/boost ]; then
328 boost_root="$INST/boost"
333 if file /bin/cp | grep -q '32-bit'; then
334 cflags="-fPIC -m32 -march=i686"
339 cmake -D CMAKE_BUILD_TYPE=Release \
340 -D CMAKE_PREFIX_PATH=$INST/oiio-$OIIO_VERSION \
341 -D CMAKE_INSTALL_PREFIX=$INST/oiio-$OIIO_VERSION \
343 -D CMAKE_CXX_FLAGS="$cflags" \
344 -D CMAKE_EXE_LINKER_FLAGS="-lgcc_s -lgcc" \
345 -D BOOST_ROOT="$boost_root" \
353 ln -s oiio-$OIIO_VERSION $INST/oiio
355 magic_compile_set oiio-$OIIO_VERSION $oiio_magic
359 INFO "Own OpenImageIO-$OIIO_VERSION is up to date, nothing to do!"
364 # To be changed each time we make edits that would modify the compiled result!
367 # Clean install if needed!
368 magic_compile_check ffmpeg-$FFMPEG_VERSION $ffmpeg_magic
369 if [ $? -eq 1 ]; then
370 rm -rf $INST/ffmpeg-$FFMPEG_VERSION
373 if [ ! -d $INST/ffmpeg-$FFMPEG_VERSION ]; then
374 INFO "Building ffmpeg-$FFMPEG_VERSION"
378 if [ ! -d $SRC/ffmpeg-$FFMPEG_VERSION ]; then
379 INFO "Downloading ffmpeg-$FFMPEG_VERSION"
380 wget -c $FFMPEG_SOURCE -P $SRC
382 INFO "Unpacking ffmpeg-$FFMPEG_VERSION"
383 tar -C $SRC -xf $SRC/ffmpeg-$FFMPEG_VERSION.tar.bz2
386 cd $SRC/ffmpeg-$FFMPEG_VERSION
391 extra="$extra --enable-libvorbis"
395 extra="$extra --enable-libtheora"
399 extra="$extra --enable-libschroedinger"
403 extra="$extra --enable-libxvid"
407 extra="$extra --enable-libx264"
411 extra="$extra --enable-libvpx"
414 if $MP3LAME_USE; then
415 extra="$extra --enable-libmp3lame"
418 if $OPENJPEG_USE; then
419 extra="$extra --enable-libopenjpeg"
422 ./configure --cc="gcc -Wl,--as-needed" --extra-ldflags="-pthread -static-libgcc" \
423 --prefix=$INST/ffmpeg-$FFMPEG_VERSION --enable-static --enable-avfilter --disable-vdpau \
424 --disable-bzlib --disable-libgsm --disable-libspeex \
425 --enable-pthreads --enable-zlib --enable-stripping --enable-runtime-cpudetect \
426 --disable-vaapi --disable-libfaac --disable-nonfree --enable-gpl \
427 --disable-postproc --disable-x11grab --disable-librtmp --disable-libopencore-amrnb \
428 --disable-libopencore-amrwb --disable-libdc1394 --disable-version3 --disable-outdev=sdl \
429 --disable-outdev=alsa --disable-indev=sdl --disable-indev=alsa --disable-indev=jack \
430 --disable-indev=lavfi $extra
437 ln -s ffmpeg-$FFMPEG_VERSION $INST/ffmpeg
439 magic_compile_set ffmpeg-$FFMPEG_VERSION $ffmpeg_magic
443 INFO "Own ffmpeg-$FFMPEG_VERSION is up to date, nothing to do!"
448 dpkg-query -W -f '${Version}' $1 | sed -r 's/^([0-9]\.[0-9]+).*/\1/'
451 check_package_DEB() {
452 r=`apt-cache policy $1 | grep -c 'Candidate:'`
454 if [ $r -ge 1 ]; then
461 check_package_version_match_DEB() {
462 v=`apt-cache policy $1 | grep 'Candidate:' | sed -r 's/.*:\s*(([0-9]+\.?)+).*/\1/'`
472 check_package_version_ge_DEB() {
473 v=`apt-cache policy $1 | grep 'Candidate:' | sed -r 's/.*:\s*(([0-9]+\.?)+).*/\1/'`
484 INFO "Installing dependencies for DEB-based distribution"
485 INFO "Source code of dependencies needed to be compiled will be downloaded and extracted into $SRC"
486 INFO "Built libs of dependencies needed to be compiled will be installed into $INST"
487 INFO "Please edit \$SRC and/or \$INST variables at the begining of this script if you want to use other paths!"
490 # XXX Why in hell? Let's let this stuff to the user's responsability!!!
491 # sudo apt-get -y upgrade
493 # These libs should always be available in debian/ubuntu official repository...
494 OPENJPEG_DEV="libopenjpeg-dev"
495 SCHRO_DEV="libschroedinger-dev"
496 VORBIS_DEV="libvorbis-dev"
497 THEORA_DEV="libtheora-dev"
499 sudo apt-get install -y cmake scons gcc g++ libjpeg-dev libpng-dev libtiff-dev \
500 libfreetype6-dev libx11-dev libxi-dev wget libsqlite3-dev libbz2-dev libncurses5-dev \
501 libssl-dev liblzma-dev libreadline-dev $OPENJPEG_DEV libopenexr-dev libopenal-dev \
502 libglew-dev yasm $SCHRO_DEV $THEORA_DEV $VORBIS_DEV libsdl1.2-dev \
503 libfftw3-dev libjack-dev python-dev patch flex bison
510 # Grmpf, debian is libxvidcore-dev and ubuntu libxvidcore4-dev!
511 XVID_DEV="libxvidcore-dev"
512 check_package_DEB $XVID_DEV
513 if [ $? -eq 0 ]; then
514 sudo apt-get install -y $XVID_DEV
517 XVID_DEV="libxvidcore4-dev"
518 check_package_DEB $XVID_DEV
519 if [ $? -eq 0 ]; then
520 sudo apt-get install -y $XVID_DEV
525 MP3LAME_DEV="libmp3lame-dev"
526 check_package_DEB $MP3LAME_DEV
527 if [ $? -eq 0 ]; then
528 sudo apt-get install -y $MP3LAME_DEV
532 X264_DEV="libx264-dev"
533 check_package_DEB $X264_DEV
534 if [ $? -eq 0 ]; then
535 sudo apt-get install -y $X264_DEV
540 check_package_version_ge_DEB $VPX_DEV $VPX_VERSION_MIN
541 if [ $? -eq 0 ]; then
542 sudo apt-get install -y $VPX_DEV
546 check_package_DEB libspnav-dev
547 if [ $? -eq 0 ]; then
548 sudo apt-get install -y libspnav-dev
551 check_package_DEB python3.3-dev
552 if [ $? -eq 0 ]; then
553 sudo apt-get install -y python3.3-dev
558 check_package_version_ge_DEB libboost-dev $BOOST_VERSION_MIN
559 if [ $? -eq 0 ]; then
560 sudo apt-get install -y libboost-dev
562 boost_version=`deb_version libboost-dev`
564 check_package_DEB libboost-locale$boost_version-dev
565 if [ $? -eq 0 ]; then
566 sudo apt-get install -y libboost-locale$boost_version-dev libboost-filesystem$boost_version-dev \
567 libboost-regex$boost_version-dev libboost-system$boost_version-dev libboost-thread$boost_version-dev
575 check_package_version_ge_DEB libopencolorio-dev $OCIO_VERSION_MIN
576 if [ $? -eq 0 ]; then
577 sudo apt-get install -y libopencolorio-dev
582 check_package_version_ge_DEB libopenimageio-dev $OIIO_VERSION_MIN
583 if [ $? -eq 0 ]; then
584 sudo apt-get install -y libopenimageio-dev
589 # XXX Debian features libav packages as ffmpeg, those are not really compatible with blender code currently :/
590 # So for now, always build our own ffmpeg.
591 # check_package_DEB ffmpeg
592 # if [ $? -eq 0 ]; then
593 # sudo apt-get install -y ffmpeg
594 # ffmpeg_version=`deb_version ffmpeg`
595 # INFO "ffmpeg version: $ffmpeg_version"
596 # if [ ! -z "$ffmpeg_version" ]; then
597 # if dpkg --compare-versions $ffmpeg_version gt 0.7.2; then
598 # sudo apt-get install -y libavfilter-dev libavcodec-dev libavdevice-dev libavformat-dev libavutil-dev libswscale-dev
607 check_package_RPM() {
608 r=`yum info $1 | grep -c 'Summary'`
610 if [ $r -ge 1 ]; then
617 check_package_version_match_RPM() {
618 v=`yum info $1 | grep Version | tail -n 1 | sed -r 's/.*:\s+(([0-9]+\.?)+).*/\1/'`
628 check_package_version_ge_RPM() {
629 v=`yum info $1 | grep Version | tail -n 1 | sed -r 's/.*:\s+(([0-9]+\.?)+).*/\1/'`
640 INFO "Installing dependencies for RPM-based distribution"
641 INFO "Source code of dependencies needed to be compiled will be downloaded and extracted into $SRC"
642 INFO "Built libs of dependencies needed to be compiled will be installed into $INST"
643 INFO "Please edit \$SRC and/or \$INST variables at the begining of this script if you want to use other paths!"
647 sudo yum -y install gcc gcc-c++ cmake scons libpng-devel libtiff-devel \
648 freetype-devel libX11-devel libXi-devel wget libsqlite3x-devel ncurses-devel \
649 readline-devel openjpeg-devel openexr-devel openal-soft-devel \
650 glew-devel yasm schroedinger-devel libtheora-devel libvorbis-devel SDL-devel \
651 fftw-devel lame-libs jack-audio-connection-kit-devel libspnav-devel \
652 libjpeg-devel patch python-devel
657 check_package_RPM x264-devel
658 if [ $? -eq 0 ]; then
659 sudo yum install -y x264-devel
663 check_package_RPM xvidcore-devel
664 if [ $? -eq 0 ]; then
665 sudo yum install -y xvidcore-devel
667 XVID_DEV="xvidcore-devel"
670 check_package_version_ge_RPM libvpx-devel 0.9.7
671 if [ $? -eq 0 ]; then
672 sudo yum install -y libvpx-devel
676 check_package_RPM lame-devel
677 if [ $? -eq 0 ]; then
678 sudo yum install -y lame-devel
682 check_package_version_match_RPM python3-devel 3.3
683 if [ $? -eq 0 ]; then
684 sudo yum install -y python-devel
689 check_package_RPM boost-devel
690 if [ $? -eq 0 ]; then
691 sudo yum install -y boost-devel
696 check_package_RPM OpenColorIO-devel
697 if [ $? -eq 0 ]; then
698 sudo yum install -y OpenColorIO-devel
703 check_package_RPM OpenImageIO-devel
704 if [ $? -eq 0 ]; then
705 sudo yum install -y OpenImageIO-devel
710 # Always for now, not sure which packages should be installed
714 check_package_SUSE() {
715 r=`zypper info $1 | grep -c 'Summary'`
717 if [ $r -ge 1 ]; then
724 check_package_version_SUSE() {
725 v=`zypper info $1 | grep Version | tail -n 1 | sed -r 's/.*:\s+(([0-9]+\.?)+).*/\1/'`
727 # for now major and minor versions only (as if x.y, not x.y.z)
728 r=`echo $v | grep -c $2`
730 if [ $r -ge 1 ]; then
738 INFO "Installing dependencies for SuSE-based distribution"
739 INFO "Source code of dependencies needed to be compiled will be downloaded and extracted into $SRC"
740 INFO "Built libs of dependencies needed to be compiled will be installed into $INST"
741 INFO "Please edit \$SRC and/or \$INST variables at the begining of this script if you want to use other paths!"
743 sudo zypper --non-interactive update --auto-agree-with-licenses
745 sudo zypper --non-interactive install --auto-agree-with-licenses \
746 gcc gcc-c++ libSDL-devel openal-soft-devel libpng12-devel libjpeg62-devel \
747 libtiff-devel OpenEXR-devel yasm libtheora-devel libvorbis-devel cmake \
750 check_package_version_SUSE python3-devel 3.3.
751 if [ $? -eq 0 ]; then
752 sudo zypper --non-interactive install --auto-agree-with-licenses python3-devel
757 # can not see boost_locale in repo, so let's build own boost
760 # this libraries are also missing in the repo
766 print_info_ffmpeglink_DEB() {
767 _packages="libtheora-dev"
770 _packages="$_packages $XVID_DEV"
774 _packages="$_packages libvpx-dev"
777 if $MP3LAME_USE; then
778 _packages="$_packages libmp3lame-dev"
782 _packages="$_packages libx264-dev"
785 if $OPENJPEG_USE; then
786 _packages="$_packages libopenjpeg-dev"
790 _packages="$_packages libschroedinger-dev"
793 dpkg -L $_packages | grep -e ".*\/lib[^\/]\+\.so" | awk '{ printf(nlines ? "'"$_ffmpeg_list_sep"'%s" : "%s", gensub(/.*lib([^\/]+)\.so/, "\\1", "g", $0)); nlines++ }'
796 print_info_ffmpeglink_RPM() {
797 _packages="libtheora-devel libvorbis-devel"
800 _packages="$_packages $XVID_DEV"
804 _packages="$_packages libvpx-devel"
807 if $MP3LAME_USE; then
808 _packages="$_packages lame-devel"
812 _packages="$_packages x264-devel"
815 if $OPENJPEG_USE; then
816 _packages="$_packages openjpeg-devel"
820 _packages="$_packages schroedinger-devel"
823 rpm -ql $_packages | grep -e ".*\/lib[^\/]\+\.so" | awk '{ printf(nlines ? "'"$_ffmpeg_list_sep"'%s" : "%s", gensub(/.*lib([^\/]+)\.so/, "\\1", "g", $0)); nlines++ }'
826 print_info_ffmpeglink() {
827 # This func must only print a ';'-separated list of libs...
828 if [ -z "$DISTRO" ]; then
829 ERROR "Failed to detect distribution type"
831 elif [ "$DISTRO" = "DEB" ]; then
832 print_info_ffmpeglink_DEB
833 elif [ "$DISTRO" = "RPM" ]; then
834 print_info_ffmpeglink_RPM
836 else INFO "<Could not determine additional link libraries needed for ffmpeg, replace this by valid list of libs...>"
837 # elif [ "$DISTRO" = "SUSE" ]; then
838 # print_info_ffmpeglink_SUSE
844 INFO "If you're using CMake add this to your configuration flags:"
846 if [ -d $INST/boost ]; then
847 INFO " -D BOOST_ROOT=$INST/boost"
848 INFO " -D Boost_NO_SYSTEM_PATHS=ON"
851 if [ -d $INST/ffmpeg ]; then
852 INFO " -D WITH_CODEC_FFMPEG=ON"
853 INFO " -D FFMPEG=$INST/ffmpeg"
854 INFO " -D FFMPEG_LIBRARIES='avformat;avcodec;avutil;avdevice;swscale;rt;`print_info_ffmpeglink`'"
858 INFO "If you're using SCons add this to your user-config:"
860 if [ -d $INST/python-3.3 ]; then
861 INFO "BF_PYTHON='$INST/python-3.3'"
862 INFO "BF_PYTHON_ABI_FLAGS='m'"
865 if [ -d $INST/ocio ]; then
866 INFO "BF_OCIO='$INST/ocio'"
869 if [ -d $INST/oiio ]; then
870 INFO "BF_OIIO='$INST/oiio'"
873 if [ -d $INST/boost ]; then
874 INFO "BF_BOOST='$INST/boost'"
877 if [ -d $INST/ffmpeg ]; then
878 INFO "BF_FFMPEG='$INST/ffmpeg'"
880 INFO "BF_FFMPEG_LIB='avformat avcodec swscale avutil avdevice `print_info_ffmpeglink`'"
884 # Detect distributive type used on this machine
887 if [ -z "$DISTRO" ]; then
888 ERROR "Failed to detect distribution type"
890 elif [ "$DISTRO" = "DEB" ]; then
892 elif [ "$DISTRO" = "RPM" ]; then
894 elif [ "$DISTRO" = "SUSE" ]; then
900 # Switch back to user language.