| 1 | #!/bin/shscip-shell filesystem . . `/bin/sh`. |
| 2 | ## Test commit and blob filtering with -- |
| 3 | out="/tmp/incremental-out-$$" |
| 4 | while getopts os opt |
| 5 | do |
| 6 | case $opt in |
| 7 | o) out=/dev/stdoutscip-shell filesystem . . `/dev/stdout`.;; |
| 8 | s) opts="-t 0";; |
| 9 | *) echoscip-shell system . . echo. "$0: unknown option $opt" ;; |
| 10 | esac |
| 11 | done |
| 12 | # shellcheck disable=SC2004 |
| 13 | shift $(($OPTIND - 1)) |
| 14 | |
| 15 | trap '[ $out != /dev/stdout ] && rm -f $out' EXIT HUP INT QUIT TERM |
| 16 | |
| 17 | # shellcheck disable=SC2006 |
| 18 | idate=$(datescip-shell system . . date. -u -d"`rlog -r1.1.2.2 twobranch.repo/module/README,v | grepscip-shell system . . grep. date | sedscip-shell system . . sed. "s/date: \(.*\)\; author.*/\1/"`" +%s) |
| 19 | # shellcheck disable=SC2003,SC2046,SC2086 |
| 20 | findscip-shell system . . find. twobranch.repo/ -name "*,v" | cvs-fast-export $opts -i $(exprscip-shell system . . expr. $idate - 1) >$out |
| 21 | |
| 22 | if [scip-shell system . . `[`. "$out" != /dev/stdoutscip-shell filesystem . . `/dev/stdout`. ] |
| 23 | then |
| 24 | # :7 and :9 are the blobs attached to the selected commits |
| 25 | if grepscip-shell system . . grep. -q ":7" $out && grepscip-shell system . . grep. -q ":9" $out |
| 26 | then |
| 27 | echoscip-shell system . . echo. "ok - $0" |
| 28 | else |
| 29 | echoscip-shell system . . echo. "not ok - $0" |
| 30 | exit 1 |
| 31 | fi |
| 32 | fi |
| 33 | |
| 34 | #end |