Add missing export and import source files to password_manager's browser target.
[chromium-blink-merge.git] / third_party / ots / test / test_unmalicious_fonts.sh
blobae3a5bbd3023fe4b50301aa10a954617a1607275
1 #!/bin/bash
3 # Copyright (c) 2009 The Chromium Authors. All rights reserved.
4 # Use of this source code is governed by a BSD-style license that can be
5 # found in the LICENSE file.
7 # Usage: ./test_unmalicious_fonts.sh [ttf_or_otf_file_name]
9 BLACKLIST=./BLACKLIST.txt
10 CHECKER=./idempotent
12 if [ ! -r "$BLACKLIST" ] ; then
13 echo "$BLACKLIST is not found."
14 exit 1
17 if [ ! -x "$CHECKER" ] ; then
18 echo "$CHECKER is not found."
19 exit 1
22 if [ $# -eq 0 ] ; then
23 # No font file is specified. Apply this script to all TT/OT files under the
24 # BASE_DIR below.
26 # On Ubuntu Linux (>= 8.04), You can install ~1800 TrueType/OpenType fonts
27 # to /usr/share/fonts/truetype by:
28 # % sudo apt-get install ttf-.*[^0]$
29 BASE_DIR=/usr/share/fonts/truetype/
30 if [ ! -d $BASE_DIR ] ; then
31 # Mac OS X
32 BASE_DIR="/Library/Fonts/ /System/Library/Fonts/"
34 # TODO(yusukes): Support Cygwin.
36 # Recursively call this script.
37 find $BASE_DIR -type f -name '*tf' -exec "$0" {} \;
38 echo
39 exit 0
42 if [ $# -gt 1 ] ; then
43 echo "Usage: $0 [ttf_or_otf_file_name]"
44 exit 1
47 # Check the font file using idempotent iff the font is not blacklisted.
48 base=`basename "$1"`
49 egrep -i -e "^$base" "$BLACKLIST" > /dev/null 2>&1 || "$CHECKER" "$1" > /dev/null 2>&1 || (echo ; echo "FAIL: $1 (Run $CHECKER $1 for more information.)")
50 echo -n "."