X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/37ab190fbf2030686e5d841992fbc856c674ee78..4dd2530846d0fcf214e3b288b04ce3aa932af048:/distrib/scripts/is_text.sh diff --git a/distrib/scripts/is_text.sh b/distrib/scripts/is_text.sh index 3b60daeade..f8df271f56 100755 --- a/distrib/scripts/is_text.sh +++ b/distrib/scripts/is_text.sh @@ -1,18 +1,40 @@ #!/bin/sh + +############################################################################### +# Name: is_text.sh +# Purpose: returns 0 if the file in cvs tree is text, 1 if binary +# Version: $Id$ +# Author: VZ +# Created: 2006-07-19 +# Copyright: (c) Vadim Zeitlin 2006 +############################################################################### + if [ $# != 1 ]; then echo "Usage: $0 " >&2 exit 2 fi +# don't do configure; config.sub; config.guess +if [ `basename $1` = "configure" ] ; then + exit 1 +fi +if [ `basename $1` = "config.sub" ] ; then + exit 1 +fi +if [ `basename $1` = "config.guess" ] ; then + exit 1 +fi + entries=`dirname $1`/CVS/Entries if [ ! -f $entries ]; then echo "CVS entries file \"$entries\" not found." >&2 exit 3 fi -re="^/`basename $1`/.*/-kb/\$" +# we look for -kb in the last field, optionally followed by tag name +re="^/`basename $1`/.*/-kb/\(T[^/]*\)\{0,1\}$" if grep -q "$re" $entries; then exit 1 fi -exit 0 \ No newline at end of file +exit 0