#! /bin/sh

# Copyright (C) 1999, Free Software Foundation
# Originally by Alexandre Oliva <oliva@gnu.org>

# This script is Free Software, and it can be copied, distributed and
# modified as defined in the GNU General Public License.  A copy of
# its license can be downloaded from http://www.gnu.org/copyleft/gpl.html

# Test whether a directory is part of a CVS tree (i.e., whether it
# contains a sub-directory named CVS).

# A list of directories can be specified, in which case the test will
# succeed if *none* of the directories are active.

# If no directory is specified, the current directory is assumed.

# Usage: if cvsdir /path/to/directory; then do-sth; fi

test $# = 0 && set .

for d
do
  if test ! -d "$d"/CVS; then
    exit 1
  fi
done

exit 0
