[Bf-blender-cvs] [0272acee0df] master: install_deps.sh: fix IFS being incorrect when a version check fails

Campbell Barton noreply at git.blender.org
Wed Jan 22 15:43:11 CET 2020


Commit: 0272acee0df3886a1d2a1814da9acc0ff2c867ca
Author: Campbell Barton
Date:   Thu Jan 23 01:35:07 2020 +1100
Branches: master
https://developer.blender.org/rB0272acee0df3886a1d2a1814da9acc0ff2c867ca

install_deps.sh: fix IFS being incorrect when a version check fails

This caused quoting to fail later on.

===================================================================

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 64cff825b10..d4f05c4bab2 100755
--- a/build_files/build_environment/install_deps.sh
+++ b/build_files/build_environment/install_deps.sh
@@ -996,8 +996,7 @@ download() {
 # Return 0 if $1 = $2 (i.e. 1.01.0 = 1.1, but 1.1.1 != 1.1), else 1.
 # $1 and $2 should be version numbers made of numbers only.
 version_eq() {
-  backIFS=$IFS
-  IFS='.'
+  local IFS='.'
 
   # Split both version numbers into their numeric elements.
   arr1=( $1 )
@@ -1032,7 +1031,6 @@ version_eq() {
     fi
   done
 
-  IFS=$backIFS
   return $ret
 }
 
@@ -1063,8 +1061,7 @@ version_ge_lt() {
 # $1 and $2 should be version numbers made of numbers only.
 # $1 should be at least as long as $2!
 version_match() {
-  backIFS=$IFS
-  IFS='.'
+  local IFS='.'
 
   # Split both version numbers into their numeric elements.
   arr1=( $1 )
@@ -1085,7 +1082,6 @@ version_match() {
     done
   fi
 
-  IFS=$backIFS
   return $ret
 }



More information about the Bf-blender-cvs mailing list