GB SDK: don't use HV2.bat when generating tools.
That's because GB uses the Tools_r& which do not have
hierarchyviewer2 so we should not try to pull the .bat from
hv2. We don't care since we'll ignore these old tools anyway
when packaging the final SDK.
Change-Id: Ie7d161bad59d6e919613db2e854f48964e59c4a9
diff --git a/build/tools/patch_windows_sdk.sh b/build/tools/patch_windows_sdk.sh
index 3cc0875..6875261 100755
--- a/build/tools/patch_windows_sdk.sh
+++ b/build/tools/patch_windows_sdk.sh
@@ -55,7 +55,12 @@
cp $V ${TOPDIR}sdk/apkbuilder/etc/apkbuilder.bat $TOOLS/
cp $V ${TOPDIR}sdk/ddms/app/etc/ddms.bat $TOOLS/
cp $V ${TOPDIR}sdk/traceview/etc/traceview.bat $TOOLS/
-cp $V ${TOPDIR}sdk/hierarchyviewer2/app/etc/hierarchyviewer.bat $TOOLS/
+if [ -f ${TOPDIR}sdk/hierarchyviewer2/app/etc/hierarchyviewer.bat ]; then
+ cp $V ${TOPDIR}sdk/hierarchyviewer2/app/etc/hierarchyviewer.bat $TOOLS/
+else
+ # That's ok because currently GB uses Tools_r7 but we'll ship Tools_r8 from master-open.
+ echo "WARNING: Ignoring ${TOPDIR}sdk/hierarchyviewer2/app/etc/hierarchyviewer.bat [ok for GB+Tools r8]"
+fi
cp $V ${TOPDIR}sdk/layoutopt/app/etc/layoutopt.bat $TOOLS/
cp $V ${TOPDIR}sdk/draw9patch/etc/draw9patch.bat $TOOLS/
cp $V ${TOPDIR}sdk/sdkmanager/app/etc/android.bat $TOOLS/