aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichael Wright <michaelwr@google.com>2024-04-23 17:20:13 +0000
committerMÃ¥rten Kongstad <amhk@google.com>2024-04-24 01:05:49 +0200
commitc55d79b7c73f1c5c12764e09f8d73e341494c191 (patch)
treee3df1cb82260592c9788312181df2074e4845c5a
parent171944d88a45d506611067dbf66eaab627bfd3e2 (diff)
downloadbuild-c55d79b7c73f1c5c12764e09f8d73e341494c191.tar.gz
Make check-flagged-apis executable
Occasionally sourcing the script would close my overall shell when it hit an error. By having it just be an executable script, this prevents it from impacting a user's normal shell environment and can depend on it always being bash, rather than whatever shell people happen to be using. Bug: 334870672 Test: tools/check-flagged-apis/check-flagged-apis.sh Change-Id: Ic46cb4fefdea8d51be018d4f7a92b0d9ca7e57b3
-rwxr-xr-x[-rw-r--r--]tools/check-flagged-apis/check-flagged-apis.sh9
1 files changed, 9 insertions, 0 deletions
diff --git a/tools/check-flagged-apis/check-flagged-apis.sh b/tools/check-flagged-apis/check-flagged-apis.sh
index ae671d1d5c..cd37a2d52e 100644..100755
--- a/tools/check-flagged-apis/check-flagged-apis.sh
+++ b/tools/check-flagged-apis/check-flagged-apis.sh
@@ -1,3 +1,5 @@
+#!/bin/bash
+
# Copyright (C) 2024 The Android Open Source Project
#
# Licensed under the Apache License, Version 2.0 (the "License");
@@ -15,6 +17,13 @@
# Run check-flagged-apis for public APIs and the three @SystemApi flavours
# Usage: lunch <your-target> && source <this script>
+source $(cd $(dirname $BASH_SOURCE) &> /dev/null && pwd)/../../shell_utils.sh
+require_top
+
+function m() {
+ $(gettop)/build/soong/soong_ui.bash --build-mode --all-modules --dir="$(pwd)" "$@"
+}
+
function build() {
m sdk dist && m \
check-flagged-apis \