The CodeEmitterGenerator used to consider ANY uninitialized field as being an
[oota-llvm.git] / utils / cvsupdate
1 #!/bin/csh -f
2 #
3 # This script updates the entire tree, saves the output in cvs.out,
4 # and then separately prints out the files that had merge conflicts,
5 # those that were merged successfully, and those that are new.
6 # Note that this script uses "cvs update -P -d".
7 #
8 # USAGE:
9 #       cvsupdate       ## normal run
10 #       cvsupdate -n    ## run grep commands on output of the last run of cvs
11 #       cvsupdate -h    ## usage information
12 #
13
14 set pstatus = 0
15 onintr cleanup
16 alias usage 'echo "USAGE: $0:t [-h][-n]"; set pstatus = 1; goto cleanup'
17
18 set doit = 1
19 set printnew = 0
20 unset options_done
21 while ( !( $?options_done ) && ($#argv > 0))
22     switch ($argv[1])
23         case -h :
24             usage
25         case -n :
26             set doit = 0; shift argv; breaksw
27         case -new :
28             set printnew = 1; shift argv; breaksw
29         default :
30             set options_done; breaksw
31     endsw
32 end
33
34 if ($doit == 1) then
35     /bin/mv -f cvs.out cvs.out.bak >&/dev/null
36     cvs update -P -d >& cvs.out
37 ##    if ($status != 0) then
38 ##        echo "ERROR: CVS update failed: "
39 ##      cat cvs.out
40 ##      exit 1
41     endif
42 else
43     echo ""; echo "NOT UPDATING FILES.  RESULTS FROM LAST RUN:"; echo ""
44 endif
45
46 echo ""; echo " FILES UPDATED:"
47 grep '^U' cvs.out
48
49 echo ""; echo " UPDATE CONFLICTS OCCURRED FOR THE FOLLOWING FILES:"
50 grep '^C' cvs.out
51
52 echo ""; echo " FILES REMOVED FROM YOUR DIRECTORY:"
53 grep 'no longer in the repository' cvs.out
54
55 echo ""; echo " FILES SUCCESSFULLY MERGED (or locally modified):"
56 grep '^M' cvs.out | grep -v Merging
57
58 echo ""; echo " NEW FILES AND DIRECTORIES:"
59 if ($printnew != 0) then
60     grep '^\?' cvs.out | & grep -v '\.bc' | grep -v Updating | grep -v cvsup | grep -v 'cvs.out' | grep -v gnumake.out | grep -v '\.mc$' | grep -v '\.s$' | grep -v '\.native'
61 else
62     echo '(USE "cvsupdate -n -new" TO SEE NEW FILES AND DIRECTORIES.)'
63 endif
64
65 echo ""
66
67
68 #=========================================================
69 # CODE TO BE EXECUTED IF INTERRUPT IS RECEIVED
70 #=========================================================
71 cleanup:
72     exit($pstatus)