summaryrefslogtreecommitdiff
path: root/tools
diff options
context:
space:
mode:
authorPaul Duffin <paulduffin@google.com>2021-04-14 14:09:04 +0100
committerPaul Duffin <paulduffin@google.com>2021-04-14 14:42:15 +0100
commit11972fd43164415c60a98dd3c0a351decc5a6196 (patch)
treed78710b6ccfe373ff4e9f0d6137aa1930729a434 /tools
parentafb6c9ff987dc9f1035a241038ba0278a9017f29 (diff)
Generalize tools/hiddenapi/checksorted_sha.sh
Stops it being specific to frameworks/base. This change works because $2 is $(REPO_ROOT) and $(REPO_ROOT)/frameworks/base is the same as $PWD when this script is used in the frameworks/base repo. Also removes boot/ from the path that identifies hidden API flag files. This keeps the directory structure needed in the repositories into which hidden API flag files will be moved simple by removing the need to have a boot/ directory. The hiddenapi/ directory is required as the files need their own separate OWNERS file. A follow up change will move this file into tools/platform-compat to allow it to be used by other repos. Bug: 177892522 Test: try and upload changes to hiddenapi flag files Change-Id: Ifb3690e7c596249fda84eff82f5a53f0b1b6f991
Diffstat (limited to 'tools')
-rwxr-xr-xtools/hiddenapi/checksorted_sha.sh4
1 files changed, 2 insertions, 2 deletions
diff --git a/tools/hiddenapi/checksorted_sha.sh b/tools/hiddenapi/checksorted_sha.sh
index 451fed6be353..72fb86737488 100755
--- a/tools/hiddenapi/checksorted_sha.sh
+++ b/tools/hiddenapi/checksorted_sha.sh
@@ -1,10 +1,10 @@
#!/bin/bash
set -e
LOCAL_DIR="$( dirname ${BASH_SOURCE} )"
-git show --name-only --pretty=format: $1 | grep "boot/hiddenapi/hiddenapi-.*txt" | while read file; do
+git show --name-only --pretty=format: $1 | grep "hiddenapi/hiddenapi-.*txt" | while read file; do
diff <(git show $1:$file) <(git show $1:$file | $LOCAL_DIR/sort_api.sh ) || {
echo -e "\e[1m\e[31m$file $1 is not sorted or contains duplicates. To sort it correctly:\e[0m"
- echo -e "\e[33m${LOCAL_DIR}/sort_api.sh $2/frameworks/base/$file\e[0m"
+ echo -e "\e[33m${LOCAL_DIR}/sort_api.sh $PWD/$file\e[0m"
exit 1
}
done