1 |
On Sat, Apr 16, 2022 at 08:21:34PM +0200, Michał Górny wrote: |
2 |
> > +# @USAGE: <command> [<args>...] |
3 |
> > +# @DESCRIPTION: |
4 |
> > +# Executes 'command' with any given arguments and exits on failure unless |
5 |
> > +# called under 'nonfatal'. |
6 |
> > +edo() { |
7 |
> > + elog "$@" |
8 |
> |
9 |
> einfo? |
10 |
|
11 |
Way I see it, this could've even been just "echo", aka econf doesn't |
12 |
use einfo to show the ./configure command either but just simple echo. |
13 |
|
14 |
e.g. if using edo to replace stuff like |
15 |
# ./configure is not real autoconf! |
16 |
local cmd=( |
17 |
./configure |
18 |
--args |
19 |
${EXTRA_ECONF} |
20 |
) |
21 |
echo ${cmd[*]}" |
22 |
"${cmd[@]}" || die "cmd failed: ${cmd[*]}" |
23 |
|
24 |
But einfo worksforme either way. Alternatively I guess it could also |
25 |
take switches for display behavior if don't want to have many functions |
26 |
using up the namespace. Not like a command would normally start with |
27 |
a dash (e.g. `edo -b command` is fine). |
28 |
|
29 |
-- |
30 |
ionen |