Check that they're sorted as expected and contain no duplicates.
The sort order now uses:
$ LC_COLLATE=C sort -f
So that non-alphanumeric characters are not ignored, giving a more
intuitive sort order. the '-f' means ignore case.
Also sort the existing lists accordingly.
Test: repo upload
Bug: 64382372
Merged-In: I52b884da33a9a46455df6747a215683d9d3c3218
Change-Id: Icc124fd8ceb3f001a9c11bbf40e0a111910c6b39
(cherry picked from commit e5dc64d428)
11 lines
439 B
Bash
Executable File
11 lines
439 B
Bash
Executable File
#!/bin/bash
|
|
set -e
|
|
LOCAL_DIR="$( dirname ${BASH_SOURCE} )"
|
|
git show --name-only --pretty=format: $1 | grep "config/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"
|
|
exit 1
|
|
}
|
|
done
|