Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Fetching contributors…

Octocat-spinner-32-eaf2f5

Cannot retrieve contributors at this time

executable file 52 lines (48 sloc) 1.119 kb
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51
#!/bin/bash
# ./store_rpt mv -v 1.34
function do_cp {
    for r in $r
      do
for f in $(grep -l "$grep$r" $m 2>/dev/null)
      do
mkdir -p t/reports/$v/$r
if test "$move" = "1"
then
mv $f t/reports/$v/$r/
else
cp -p $f t/reports/$v/$r/
fi
done
done
}

if test "$1" = "mv"; then move=1; shift; fi
if test "$1" = "-v"; then
v=$2
else
v=`perl -ane'print $F[2] if /^VERSION =/' Makefile`
fi

m=$(ls log.modules-5.*|egrep -v ".(orig|err)")
if [ -n "$m" ]; then
r=$(perl -lane "print substr(\$F[4],1) if /VERSION = $v r/" $m)
    if [ -n "$r" ]; then
grep="VERSION = $v r"
    else
r=$(perl -lane "print \$F[4] if /^# B::C::VERSION = 1.\\d\\d \\w+ /" $m)
grep="VERSION = $v "
    fi
do_cp
fi

m=$(ls log.test-*-5.*|egrep -v ".(orig|err)")
if [ -n "$m" ]; then
r=$(perl -lane "print \$F[1] if /^Revision: \\d+\$/" $m)
    if [ -n "$r" ]; then
        # svn
grep="Revision: "
    else
# git
r=$(perl -lane "print \$F[4] if /^# B::C::VERSION = 1.\\d\\d \\w+ /" $m)
test -z $r && r=$(perl -lane "print \$F[1] if /^commit \\w+$/" $m)
grep=" "
    fi
do_cp
fi
Something went wrong with that request. Please try again.