chiark / gitweb /
README: Update copyright date
[subdirmk.git] / tests / build-common
1 # subdirmk - part of the test suite
2 #  Copyright 2019 Mark Wooding
3 #  Copyright 2019 Ian Jackson
4 # SPDX-License-Identifier: LGPL-2.0-or-later
5 # There is NO WARRANTY.
6
7 SUBDIRMK_REGEN_NDEBUG=''
8 export SUBDIRMK_REGEN_NDEBUG
9
10 make_copy () {
11         rm -rf tests/$1/example
12         mkdir tests/$1/example
13
14         git ls-files -z example \
15         | xargs -0 \
16         sh -xec 'rsync -R -l "$@" tests/'$1'/' x
17
18         rm tests/$1/example/subdirmk
19
20         git ls-files -z :. :!example \
21         | xargs -0 \
22         sh -xec 'rsync -R -l "$@" tests/'$1'/example/subdirmk' x
23 }