Merge "Generalize tools/hiddenapi/checksorted_sha.sh" am: a48ee296ee

Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1675866

Change-Id: Ibc62e793e19a4c8c90678a55a91c070d2bf0e3d8
This commit is contained in:
Paul Duffin
2021-04-14 17:40:24 +00:00
committed by Automerger Merge Worker

View File

@@ -1,10 +1,10 @@
#!/bin/bash #!/bin/bash
set -e set -e
LOCAL_DIR="$( dirname ${BASH_SOURCE} )" 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 ) || { 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[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 exit 1
} }
done done