summaryrefslogtreecommitdiff
path: root/tools/update_allowed_list.sh
blob: c3453006decef7bc08b331d1c8cee7b9fb18259c (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
#!/bin/bash

usage () {
  echo "Usage: $0 apex_allowed_list_file apex_contents_file"
}

if [[ $# -ne 2 ]]; then
  usage
  exit 1
fi

echo "Adding following files to $1:"
diff \
  --unchanged-group-format='' \
  --changed-group-format='%<' \
  $2 $1

cat $1 $2 | sort -u > $1