Correct __CrossBuild in build-packages to be 0 or 1 (dotnet/coreclr#22769)
authorJarret Shook <jashoo@microsoft.com>
Fri, 22 Feb 2019 00:29:59 +0000 (16:29 -0800)
committerGitHub <noreply@github.com>
Fri, 22 Feb 2019 00:29:59 +0000 (16:29 -0800)
Commit migrated from https://github.com/dotnet/coreclr/commit/2c10ccaefa48d3418d1fc4fbc4f49eee5745b623

src/coreclr/build-packages.sh

index 50ca4d8..80cdc45 100755 (executable)
@@ -17,7 +17,7 @@ initDistroRid()
     local passedRootfsDir=""
 
     # Only pass ROOTFS_DIR if __DoCrossArchBuild is specified.
-    if [ -z "${__CrossBuild}" ]; then
+    if (( ${__CrossBuild} == 1 )); then
         passedRootfsDir=${ROOTFS_DIR}
     fi
 
@@ -26,6 +26,7 @@ initDistroRid()
 
 __ProjectRoot="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
 __IsPortableBuild=1
+__CrossBuild=0
 
 # Use uname to determine what the OS is.
 OSName=$(uname -s)