aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPrashanth Swaminathan <prashanthsw@google.com>2024-02-13 16:25:00 -0800
committerPrashanth Swaminathan <prashanthsw@google.com>2024-02-14 00:31:27 +0000
commit2dff31133dd6e04aed55335046e4cfeebfab60d4 (patch)
tree3499fd96b86f0ecb2b8497c89c3c03539a91fc32
parent8627b30355f9ed076b64de8db9f5d0cc0cdd8fd9 (diff)
downloadcuttlefish_vmm-2dff31133dd6e04aed55335046e4cfeebfab60d4.tar.gz
Check for ANDROID_BUILD_TOP in rebuild.sh
Add a nicer log when the rebuild.sh script is run without setting the Android build environment parameters. Test: Ran rebuild.sh locally, with and without 'lunch'. Change-Id: Iaecd5e88a487614dea732aadf9ba3f82465482c9
-rwxr-xr-xrebuild.sh4
1 files changed, 4 insertions, 0 deletions
diff --git a/rebuild.sh b/rebuild.sh
index 91b1a5f..b08fa5a 100755
--- a/rebuild.sh
+++ b/rebuild.sh
@@ -8,6 +8,10 @@
# INTERNAL_IP can be set to --internal-ip run on a GCE instance
# The instance will need --scope compute-rw
+if [ -z "${ANDROID_BUILD_TOP}" ]; then
+ echo "ANDROID_BUILD_TOP is not set, did you forget to lunch?" && exit 1
+fi
+
source "${ANDROID_BUILD_TOP}/external/shflags/shflags"
DIR="${ANDROID_BUILD_TOP}/device/google/cuttlefish_vmm"