Home | History | Annotate | Download | only in hiddenapi
      1 #!/bin/bash
      2 set -e
      3 LOCAL_DIR="$( dirname ${BASH_SOURCE} )"
      4 git 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     }
     10 done
     11