2006-07-17 20:50:06 -04:00
|
|
|
#!/bin/sh
|
2006-07-20 11:25:26 -04:00
|
|
|
|
|
|
|
###############################################################################
|
|
|
|
# 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 <vadim@wxwindows.org>
|
|
|
|
###############################################################################
|
|
|
|
|
2006-07-17 20:50:06 -04:00
|
|
|
if [ $# != 1 ]; then
|
|
|
|
echo "Usage: $0 <file>" >&2
|
|
|
|
exit 2
|
|
|
|
fi
|
|
|
|
|
2006-12-13 04:46:20 -05:00
|
|
|
# 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
|
|
|
|
|
2008-02-11 03:59:59 -05:00
|
|
|
# ignore makefile.wat etc
|
|
|
|
if [ `basename $1` = "makefile.wat" ] ; then
|
|
|
|
exit 1
|
|
|
|
fi
|
|
|
|
if [ `basename $1` = "config.wat" ] ; then
|
|
|
|
exit 1
|
|
|
|
fi
|
|
|
|
|
|
|
|
|
2007-07-05 13:02:58 -04:00
|
|
|
if svn proplist $1 | grep -q "eol-style" ; then
|
|
|
|
exit 0
|
|
|
|
fi
|
2006-07-17 20:50:06 -04:00
|
|
|
|
2007-07-05 13:02:58 -04:00
|
|
|
#either not a svn file or not one with eol-style
|
|
|
|
exit 3
|