File: commit_action.sh

package info (click to toggle)
cvsgraph 1.7.0-6
  • links: PTS
  • area: main
  • in suites: forky, sid, trixie
  • size: 1,332 kB
  • sloc: ansic: 5,248; sh: 950; yacc: 440; lex: 212; makefile: 70
file content (21 lines) | stat: -rw-r--r-- 634 bytes parent folder | download | duplicates (6)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
#!/bin/sh

trace=.cvs_tag_tracer

# avoid recursion
if [ "$recursive_flag" != "stop" ]; then
  recursive_flag=stop
  if [ -f $trace ]; then
    branch=`cvs -n status $trace |grep branch:| awk '{print $4 $5}'`
    prefix=`cvs -n status $trace |grep branch:| awk '{print $3}'`
    merged=`fgrep branch: $trace`
    if [ "$branch" != "$merged" ]; then
      if [ `echo $merged | grep branch: | wc -l` -gt 0 ]; then
        lockdir=`cat CVS/Root`/`cat CVS/Repository`/\#cvs.lock
        (while [ -d $lockdir ]; do sleep 1; done; \
	cvs tag B_${prefix}_`fgrep merged_ $trace` $trace \
	2> /dev/null 1> /dev/null )&
      fi
    fi
  fi
fi