#!/bin/sh
#
# Part of the prcsutils package
# Copyright (C) 2001  Hugo Cornelis <hugo@bbf.uia.ac.be>
#
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License
# as published by the Free Software Foundation; either version 2
# of the License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with prcs, The Project Revision Control System available at 
# http://www.xcf.berkeley.edu ; if not, write to the Free Software
# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
#
# $Project: prcs $
# $ProjectHeader: prcs 1.3.3-relase.1 Sun, 09 May 2004 18:34:01 -0700 jmacd $
# $Id: prcspatch 1.1 Fri, 03 May 2002 09:09:57 -0700 jmacd $
#
# prcspatch : create a patch file ignoring the project descriptor.
#		patch file is generated from diffs for working project
#		and goes to stdout.
#

projects=`ls 2>/dev/null -l *.prj | wc -l`
[ `ls -l *.prj | wc -l` -ne 1 ] && echo 1>&2 "expecting exactly one project descriptor in this directory `pwd`" && exit 1
prcs diff -N *.prj `prcs 2>/dev/null execute --not :project-file ` -- --unified
