#! /bin/sh

test -z "${FW_TRACE}" || set -x

cvs -n -q up "$@" >/dev/null 2>/dev/null || exit 1

files=`
  cvs -n -q up "$@" 2>&1 |                                              \
  perl -ne 'chomp; m/to create an entry for \140?([^\140\047]+?)\047?$/ && do
              {
                my $x = $1;
                $x =~ s/(\s)/\134$1/g;
                print "$x ";
              }'`

test -z "$files" || cvs -Q add $files
