|
1 | | -#!/usr/bin/env sh |
| 1 | +#!@SHELL@ |
2 | 2 | set -e |
3 | 3 |
|
| 4 | +alias find="${FIND:-@FIND@}" |
| 5 | +alias grep="${GREP:-@GREP@}" |
| 6 | +alias sed="${SED:-@SED@}" |
| 7 | +alias sort="${SORT:-@SORT@}" |
| 8 | +alias xargs="${XARGS:-@XARGS@}" |
| 9 | + |
4 | 10 | finder () { |
5 | | - test -d "$1" || return 0 |
6 | | - @FIND@ "$@" -type f | sort -bdi | xargs printf ' %s' |
| 11 | + test -d "$1" || return 1 |
| 12 | + find "$@" -type f | am_list |
| 13 | +} |
| 14 | + |
| 15 | +am_list () { |
| 16 | + sed -e 's#^\./##' | sort -bdi | xargs printf ' \\\n\t%s' |
7 | 17 | } |
8 | 18 |
|
9 | | -printf '%s' "SILEDATA =" |
| 19 | +printf '%s =' SILEDATA |
10 | 20 | finder core -name '*.lua' -not -name '*_spec.lua' -not -name 'version.lua' -not -name 'features.lua' -not -name 'pathsetup.lua' |
11 | 21 | finder classes inputters languages outputters packages shapers types typesetters pagebuilders -name '*.lua' -not -name '*_spec.lua' |
12 | 22 | finder classes i18n packages -name '*.ftl' |
13 | 23 | finder packages -name '*.svg' |
14 | 24 |
|
15 | | -printf '\n%s' "LUALIBRARIES =" |
| 25 | +printf '\n\n%s =' LUALIBRARIES |
16 | 26 | finder lua-libraries -name '*.lua' |
17 | 27 |
|
18 | | -printf '\n%s' "LUAMODULES =" |
| 28 | +printf '\n\n%s =' LUAMODULES |
19 | 29 | finder lua_modules -not -name "'*~'" |
20 | 30 |
|
21 | | -printf '\n%s' "_TESTSRCS :=" |
22 | | -finder tests -maxdepth 1 -name '*.sil' |
23 | | -finder tests -maxdepth 1 -name '*.xml' |
24 | | -finder tests -maxdepth 1 -name '*.lua' |
25 | | -finder tests -maxdepth 1 -name '*.nil' |
| 31 | +printf '\n\n%s :=' _TESTSRCS |
| 32 | +{ |
| 33 | +find tests -maxdepth 1 -name '*.sil' -type f |
| 34 | +find tests -maxdepth 1 -name '*.xml' -type f |
| 35 | +find tests -maxdepth 1 -name '*.lua' -type f |
| 36 | +find tests -maxdepth 1 -name '*.nil' -type f |
| 37 | +} | |
| 38 | + am_list |
26 | 39 |
|
27 | | -printf '\n%s' "_TESTPREVIEWS ?=" |
| 40 | +printf '\n\n%s ?=' _TESTPREVIEWS |
28 | 41 | { |
29 | | -finder tests -maxdepth 1 -name '*.sil' |
30 | | -finder tests -maxdepth 1 -name '*.xml' |
31 | | -finder tests -maxdepth 1 -name '*.lua' |
32 | | -finder tests -maxdepth 1 -name '*.nil' |
| 42 | +find tests -maxdepth 1 -name '*.sil' -type f |
| 43 | +find tests -maxdepth 1 -name '*.xml' -type f |
| 44 | +find tests -maxdepth 1 -name '*.lua' -type f |
| 45 | +find tests -maxdepth 1 -name '*.nil' -type f |
33 | 46 | } | |
34 | | - xargs @GREP@ -L KNOWNBAD | |
35 | | - xargs printf ' %s' |
| 47 | + xargs grep -L KNOWNBAD | |
| 48 | + am_list |
36 | 49 |
|
37 | | -printf '\n%s' "BUSTEDSPECS ?=" |
38 | | -finder . -maxdepth 1 -name '*_spec.lua' |
| 50 | +printf '\n\n%s ?=' BUSTEDSPECS |
| 51 | +finder . -name '*_spec.lua' |
39 | 52 |
|
40 | | -printf '\n%s' "TESTEXPECTS ?=" |
| 53 | +printf '\n\n%s ?=' TESTEXPECTS |
41 | 54 | finder tests -maxdepth 1 -name '*.expected' |
0 commit comments