blob: ceb705f4e42a8a91e730aec59d42aea6f31456c6 [file] [log] [blame]
David Brazdil2200a1b2018-05-05 12:07:38 +01001#!/bin/bash
2set -e
3LOCAL_DIR="$( dirname ${BASH_SOURCE} )"
4git show --name-only --pretty=format: $1 | grep "config/hiddenapi-.*txt" | while read file; do
5 diff <(git show $1:$file) <(git show $1:$file | $LOCAL_DIR/sort_api.sh ) || {
6 echo -e "\e[1m\e[31m$file $1 is not sorted or contains duplicates. To sort it correctly:\e[0m"
7 echo -e "\e[33m${LOCAL_DIR}/sort_api.sh $2/frameworks/base/$file\e[0m"
8 exit 1
9 }
10done