Subversion Repositories planix.SVN

Rev

Rev 2 | Details | Compare with Previous | Last modification | View Log | RSS feed

Rev Author Line No. Line
2 - 1
#!/bin/rc
2
 
3
rfork n
4
cd $1
5
*=(`{ls -drp [0-9]*})
6
 
7
while(! ~ $#* 0 1){
8
	diff -n $2/index.txt $1/index.txt | awk  -F'[\/ :]' '
9
	$1 ~/^[0-9]+$/ {  
10
		getA = "cat "$5"/current | sed -n -e ''1d; /^A/s/^A//p; /^#/q''"
11
		getA | getline A; close getA
12
		$1 = t2d($1)
13
		$5 = t2d($5)
14
		print "\n" A ":\n" $1":"$3" "$4" "$5":"$7
15
		next
16
	} 
17
	{ print }
18
 
19
	function t2d(t) {
20
		c = "date "t; c|getline l; close c
21
		split(l, a, "[ :]+")
22
		return  a[1]" "a[2]" "a[3]" "a[4]":"a[5]" "a[8]"("t")"
23
	}'
24
	shift
25
}  
26
 
27
echo clean >/dev/ctl >[2]/dev/null