#!/bin/sh # # 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, 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 GNU CC; see the file COPYING. If not, write to # the Free Software Foundation, 59 Temple Place - Suite 330, # Boston, MA 02111-1307, USA. # # Copyright (C) 2002-2003 Vino Fernando Crescini # # Vino Fernando Crescini # Started: 2002 Aug 11 # Updated: 2003 Dec 07 progname="check_cvs" progver="1.0" unset verbose while [ ${#} -ge 1 ]; do if [ "${1}" = "-h" ]; then echo "usage: ${progname} [options]" echo "options:" echo " -h print this usage and exit" echo " -v verbose output" echo " -V print version and exit" echo "" exit 0 elif [ "${1}" = "-v" ]; then verbose="1" elif [ "${1}" = "-V" ]; then echo "${progname} ${progver}" exit 0 fi shift 1 done # modified cvs diff --brief 2>&1 | grep "Index:" | cut -d ' ' -f 2 | ( [ -n "${verbose}" ] && while read i; do echo "M ${i}"; done || cat ) # added cvs diff --brief 2>&1 | grep "is a new entry," | cut -d ' ' -f 3 | ( [ -n "${verbose}" ] && while read i; do echo "A ${i}"; done || cat ) # removed cvs diff --brief 2>&1 | grep "was removed," | cut -d ' ' -f 3 | ( [ -n "${verbose}" ] && while read i; do echo "R ${i}"; done || cat ) exit 0