meson: use "sh -eu" and make .sh +x, .py -x
Shell scripts should be executable so that meson reports their invocation succinctly (does not print 'sh' '-e'). Python scripts should not be executable so that meson does the detection of the right python binary itself. Add -u everywhere to catch potential errors.
This commit is contained in:
parent
a923e085af
commit
86b3ca7a66
|
@ -1,4 +1,4 @@
|
||||||
#!/bin/sh
|
#!/bin/sh -eu
|
||||||
|
|
||||||
$1 -E -dM -include sys/socket.h - </dev/null | \
|
$1 -E -dM -include sys/socket.h - </dev/null | \
|
||||||
grep -Ev 'AF_UNSPEC|AF_MAX' | \
|
grep -Ev 'AF_UNSPEC|AF_MAX' | \
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
#!/bin/sh -e
|
#!/bin/sh -eu
|
||||||
|
|
||||||
$1 -dM -include net/if_arp.h - </dev/null | \
|
$1 -dM -include net/if_arp.h - </dev/null | \
|
||||||
awk '/^#define[ \t]+ARPHRD_[^ \t]+[ \t]+[^ \t]/ { print $2; }' | \
|
awk '/^#define[ \t]+ARPHRD_[^ \t]+[ \t]+[^ \t]/ { print $2; }' | \
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
#!/bin/sh -e
|
#!/bin/sh -eu
|
||||||
|
|
||||||
$1 -dM -include linux/capability.h -include "$2" -include "$3" - </dev/null | \
|
$1 -dM -include linux/capability.h -include "$2" -include "$3" - </dev/null | \
|
||||||
awk '/^#define[ \t]+CAP_[A-Z_]+[ \t]+/ { print $2; }' | \
|
awk '/^#define[ \t]+CAP_[A-Z_]+[ \t]+/ { print $2; }' | \
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
#!/bin/sh -e
|
#!/bin/sh -eu
|
||||||
|
|
||||||
$1 -dM -include errno.h - </dev/null | \
|
$1 -dM -include errno.h - </dev/null | \
|
||||||
awk '/^#define[ \t]+E[^ _]+[ \t]+/ { print $2; }'
|
awk '/^#define[ \t]+E[^ _]+[ \t]+/ { print $2; }'
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
#!/bin/sh -e
|
#!/bin/sh -eu
|
||||||
|
|
||||||
if nm -D -u "$1" | grep ' U '; then
|
if nm -D -u "$1" | grep ' U '; then
|
||||||
echo "Undefined symbols detected!"
|
echo "Undefined symbols detected!"
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
#!/bin/sh -e
|
#!/bin/sh -eu
|
||||||
|
|
||||||
cpp="$1"
|
cpp="$1"
|
||||||
shift
|
shift
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
#!/bin/sh -e
|
#!/bin/sh -eu
|
||||||
|
|
||||||
$1 -dM -include linux/input.h - </dev/null | \
|
$1 -dM -include linux/input.h - </dev/null | \
|
||||||
awk '/^#define[ \t]+KEY_[^ ]+[ \t]+[0-9K]/ { if ($2 != "KEY_MAX") { print $2 } }'
|
awk '/^#define[ \t]+KEY_[^ ]+[ \t]+[0-9K]/ { if ($2 != "KEY_MAX") { print $2 } }'
|
||||||
|
|
|
@ -1,3 +1,3 @@
|
||||||
#!/bin/sh -e
|
#!/bin/sh -eu
|
||||||
|
|
||||||
"$@" '-' '-c' -o/dev/null </dev/null
|
"$@" '-' '-c' -o/dev/null </dev/null
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
#!/bin/sh -e
|
#!/bin/sh -eu
|
||||||
|
|
||||||
# output width
|
# output width
|
||||||
if "$1" --help | grep -v 'default:' | grep -E -q '.{80}.'; then
|
if "$1" --help | grep -v 'default:' | grep -E -q '.{80}.'; then
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
#!/bin/sh -e
|
#!/bin/sh -eu
|
||||||
|
|
||||||
git shortlog -s `git describe --abbrev=0`.. | \
|
git shortlog -s `git describe --abbrev=0`.. | \
|
||||||
cut -c8- | \
|
cut -c8- | \
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
#!/bin/sh -ex
|
#!/bin/sh -eu
|
||||||
|
|
||||||
cd "$1"
|
cd "$1"
|
||||||
|
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
#!/bin/sh -e
|
#!/bin/sh -eu
|
||||||
|
|
||||||
# this is needed mostly because $DESTDIR is provided as a variable,
|
# this is needed mostly because $DESTDIR is provided as a variable,
|
||||||
# and we need to create the target directory...
|
# and we need to create the target directory...
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
#!/bin/sh -e
|
#!/bin/sh -eu
|
||||||
|
|
||||||
unitdir="$1"
|
unitdir="$1"
|
||||||
target="$2"
|
target="$2"
|
||||||
|
|
Loading…
Reference in New Issue