mirror of
https://github.com/ElementsProject/lightning.git
synced 2025-01-18 13:25:43 +01:00
tools/mockup: Fix macOS bash 3 syntax error
Changelog-Fixed: Fixes `make` with `--enable-developer` option on macOS.
This commit is contained in:
parent
8d146ea36f
commit
bbaca4bb5c
@ -8,10 +8,8 @@ fi
|
|||||||
UPDIRNAME=$(dirname "$(dirname "$1")")
|
UPDIRNAME=$(dirname "$(dirname "$1")")
|
||||||
shift
|
shift
|
||||||
|
|
||||||
if [ $# -eq 0 ]; then
|
function process_line {
|
||||||
# With no args, read stdin to scrape compiler output.
|
LINE=$1
|
||||||
# shellcheck disable=SC2046
|
|
||||||
set -- $(while read -r LINE; do
|
|
||||||
case "$LINE" in
|
case "$LINE" in
|
||||||
*undefined\ reference\ to*)
|
*undefined\ reference\ to*)
|
||||||
# file.cc:(.text+0x10): undefined reference to `foo()'
|
# file.cc:(.text+0x10): undefined reference to `foo()'
|
||||||
@ -29,9 +27,16 @@ if [ $# -eq 0 ]; then
|
|||||||
echo "${LINE%\"*}"
|
echo "${LINE%\"*}"
|
||||||
;;
|
;;
|
||||||
*)
|
*)
|
||||||
continue
|
return
|
||||||
;;
|
;;
|
||||||
esac; done | LC_ALL=C sort -u)
|
esac
|
||||||
|
}
|
||||||
|
|
||||||
|
if [ $# -eq 0 ]; then
|
||||||
|
# With no args, read stdin to scrape compiler output.
|
||||||
|
# shellcheck disable=SC2046
|
||||||
|
set -- $(while read -r LINE; do
|
||||||
|
process_line "$LINE"; done | LC_ALL=C sort -u)
|
||||||
fi
|
fi
|
||||||
|
|
||||||
for SYMBOL; do
|
for SYMBOL; do
|
||||||
|
Loading…
Reference in New Issue
Block a user