regenerate-NOTICE.sh revision e779e31468999c7ef69f424a2b8271969833df28
1#!/bin/bash
2
3# Change into the libandroid_support directory.
4DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
5cd $DIR
6
7# Pull the notices from the files in libandroid_support itself (via `.`),
8# plus all the bionic files we pull in.
9sed '/$(BIONIC_PATH).*\.c/ { s| *$(BIONIC_PATH)|../../../../bionic/| ; s| *\\$|| ; p } ; d' Android.mk | \
10    xargs ../../../../bionic/libc/tools/generate-NOTICE.py . > NOTICE
11
12# Show the caller what we've done.
13git diff --exit-code HEAD ./NOTICE
14exit $?
15