Fix win_sdk.
Do not invoke atree on windows unless we need it.
Change-Id: Ie11cb35bb5e9bccb6665f7d7b9cb92cda2445c8d
diff --git a/build/patch_windows_sdk.sh b/build/patch_windows_sdk.sh
index 54fc7b7..addcc02 100755
--- a/build/patch_windows_sdk.sh
+++ b/build/patch_windows_sdk.sh
@@ -23,12 +23,11 @@
set -e # any error stops the build
# Verbose by default. Use -q to make more silent.
-V=""
if [[ "$1" == "-q" ]]; then
shift
else
echo "Win SDK: $0 $*"
- set -x # show bash commands; no need for V=-v
+ set -x # show bash commands
fi
TEMP_SDK_DIR=$1
@@ -36,9 +35,10 @@
TOPDIR=${TOPDIR:-$3}
# Invoke atree to copy the files
-# TODO: pass down OUT_HOST_EXECUTABLE to get the right bin/atree directory
-${TOPDIR}out/host/linux-x86/bin/atree -f ${TOPDIR}sdk/build/tools.windows.atree \
- -I $WIN_OUT_DIR/host/windows-x86 \
- -I ${TOPDIR:-.} \
- -o $TEMP_SDK_DIR
+if [[ -f ${TOPDIR}sdk/build/tools.windows.atree ]]; then
+ ${TOPDIR}out/host/linux-x86/bin/atree -f ${TOPDIR}sdk/build/tools.windows.atree \
+ -I $WIN_OUT_DIR/host/windows-x86 \
+ -I ${TOPDIR:-.} \
+ -o $TEMP_SDK_DIR
+fi