]> git.saurik.com Git - wxWidgets.git/blame_incremental - distrib/scripts/is_text.sh
WinCE build fix.
[wxWidgets.git] / distrib / scripts / is_text.sh
... / ...
CommitLineData
1#!/bin/sh
2
3###############################################################################
4# Name: is_text.sh
5# Purpose: returns 0 if the file in cvs tree is text, 1 if binary
6# Version: $Id$
7# Author: VZ
8# Created: 2006-07-19
9# Copyright: (c) Vadim Zeitlin 2006 <vadim@wxwindows.org>
10###############################################################################
11
12if [ $# != 1 ]; then
13 echo "Usage: $0 <file>" >&2
14 exit 2
15fi
16
17entries=`dirname $1`/CVS/Entries
18if [ ! -f $entries ]; then
19 echo "CVS entries file \"$entries\" not found." >&2
20 exit 3
21fi
22
23# we look for -kb in the last field, optionally followed by tag name
24re="^/`basename $1`/.*/-kb/\(T[^/]*\)\{0,1\}$"
25if grep -q "$re" $entries; then
26 exit 1
27fi
28
29exit 0