chiark / gitweb /
git-debrebase: test suite: gdr-subcommands: honour new $xopts
[dgit.git] / tests / tests / orig-include-exclude-chkquery
1 #!/bin/bash
2 set -e
3 . tests/lib
4
5 t-git-config dgit-distro.test-dummy.archive-query ftpmasterapi:
6 # ^ that will crash if it gets unexpected file_in_archive queries
7
8 # orig-include-exclude will set origs and usvsns
9 update-files_in_archive () {
10         for o in $origs; do for usvsn in $usvsns; do \
11                 of=${p}_${v%-*}.${o}.tar.gz
12                 pat="%/${of//_/\\_}"
13                 # curl url-decodes these things so we have to have literals
14                 find $tmp/mirror -name $of | \
15                         xargs -r sha256sum | \
16                         perl -pe '
17                                 BEGIN { print "["; }
18                                 chomp;
19                                 s/^/{"sha256sum":"/;
20                                 s/  /","filename":"/;
21                                 s/$/"}$delim/;
22                                 $delim=",";
23                                 END { print "]\n"; }
24                         ' \
25                         >$tmp/aq/"file_in_archive/$pat"
26         done; done
27 }
28
29 test_push_2_hook=update-files_in_archive
30
31 . $troot/lib-orig-include-exclude
32
33 t-ok