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
This commit is contained in:
committed by
Mårten Kongstad
parent
171944d88a
commit
c55d79b7c7
9
tools/check-flagged-apis/check-flagged-apis.sh
Normal file → Executable file
9
tools/check-flagged-apis/check-flagged-apis.sh
Normal file → Executable file
@@ -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 \
|
||||
|
Reference in New Issue
Block a user