From 355df3f73d6eabc7ce236c0204fe155996543d08 Mon Sep 17 00:00:00 2001 From: "Vikram S. Adve" Date: Mon, 11 Feb 2002 20:59:26 +0000 Subject: [PATCH 1/1] Shell script to simplify running cvs and viewing the output. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@1727 91177308-0d34-0410-b5e6-96231b3b80d8 --- cvsupdate | 54 +++++++++++++++++++++++++++++++++++++++++++++++++ utils/cvsupdate | 54 +++++++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 108 insertions(+) create mode 100755 cvsupdate create mode 100755 utils/cvsupdate diff --git a/cvsupdate b/cvsupdate new file mode 100755 index 00000000000..125c6099cb7 --- /dev/null +++ b/cvsupdate @@ -0,0 +1,54 @@ +#!/bin/csh -f -c +# +# This script updates the entire tree, saves the output in cvs.out, +# and then separately prints out the files that had merge conflicts, +# those that were merged successfully, and those that are new. +# Note that this script uses "cvs update -P -d". +# +# USAGE: +# cvsupdate ## normal run +# cvsupdate -n ## run grep commands on output of the last run of cvs +# cvsupdate -h ## usage information +# + +set pstatus = 0 +onintr cleanup +alias usage 'echo "USAGE: $0:t [-h][-n]"; set pstatus = 1; goto cleanup' + +set doit = 1 +unset options_done +while ( !( $?options_done ) && ($#argv > 0)) + switch ($argv[1]) + case -h : + usage + case -n : + set doit = 0; shift argv; breaksw + default : + set options_done; breaksw + endsw +end + +if ($doit == 1) then + /bin/mv -f cvs.out cvs.out.bak + cvs update -P -d >& cvs.out +else + echo ""; echo "Not updating files."; echo "" +endif + +echo ""; echo " UPDATE CONFLICTS OCCURRED FOR THE FOLLOWING FILES (OR NONE):" +grep '^C' cvs.out + +echo ""; echo " FILES SUCCESSFULLY MERGED:" +grep '^M' cvs.out | grep -v Merging + +echo ""; echo " NEW FILES AND DIRECTORIES:" +grep '^\?' cvs.out | & grep -v '/De[bp]' | grep -v '\.bc' | grep -v /Release | grep -v Updating | grep -v cvsup | grep -v 'cvs.out' | grep -v gnumake.out | grep -v tools/as/as | grep -v tools/dis/dis | grep -v tools/opt/opt | grep -v tools/analyze/analyze + +echo "" + + +#========================================================= +# CODE TO BE EXECUTED IF INTERRUPT IS RECEIVED +#========================================================= +cleanup: + exit($pstatus) diff --git a/utils/cvsupdate b/utils/cvsupdate new file mode 100755 index 00000000000..125c6099cb7 --- /dev/null +++ b/utils/cvsupdate @@ -0,0 +1,54 @@ +#!/bin/csh -f -c +# +# This script updates the entire tree, saves the output in cvs.out, +# and then separately prints out the files that had merge conflicts, +# those that were merged successfully, and those that are new. +# Note that this script uses "cvs update -P -d". +# +# USAGE: +# cvsupdate ## normal run +# cvsupdate -n ## run grep commands on output of the last run of cvs +# cvsupdate -h ## usage information +# + +set pstatus = 0 +onintr cleanup +alias usage 'echo "USAGE: $0:t [-h][-n]"; set pstatus = 1; goto cleanup' + +set doit = 1 +unset options_done +while ( !( $?options_done ) && ($#argv > 0)) + switch ($argv[1]) + case -h : + usage + case -n : + set doit = 0; shift argv; breaksw + default : + set options_done; breaksw + endsw +end + +if ($doit == 1) then + /bin/mv -f cvs.out cvs.out.bak + cvs update -P -d >& cvs.out +else + echo ""; echo "Not updating files."; echo "" +endif + +echo ""; echo " UPDATE CONFLICTS OCCURRED FOR THE FOLLOWING FILES (OR NONE):" +grep '^C' cvs.out + +echo ""; echo " FILES SUCCESSFULLY MERGED:" +grep '^M' cvs.out | grep -v Merging + +echo ""; echo " NEW FILES AND DIRECTORIES:" +grep '^\?' cvs.out | & grep -v '/De[bp]' | grep -v '\.bc' | grep -v /Release | grep -v Updating | grep -v cvsup | grep -v 'cvs.out' | grep -v gnumake.out | grep -v tools/as/as | grep -v tools/dis/dis | grep -v tools/opt/opt | grep -v tools/analyze/analyze + +echo "" + + +#========================================================= +# CODE TO BE EXECUTED IF INTERRUPT IS RECEIVED +#========================================================= +cleanup: + exit($pstatus) -- 2.34.1