mirror of
https://gitlab.freedesktop.org/libinput/libinput.git
synced 2025-12-20 19:40:05 +01:00
When running libinput tools from the builddir, look up the subtools in the builddir as well. Otherwise, add the install prefix to the list of lookup locations. This ensures that a) we're running builddir stuff against builddir stuff, but also b) that we're not running builddir stuff against installed stuff because that may give us false positives. The test was squashed in from a separate patch and was Reviewed-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk> Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
18 lines
375 B
Bash
Executable file
18 lines
375 B
Bash
Executable file
#!/bin/bash -x
|
|
#
|
|
# Usage: helper-copy-and-exec-from-tmp.sh /path/to/binary [args]
|
|
#
|
|
# Copies the given binary into a unique file in /tmp and executes it with
|
|
# [args]. Exits with the same return code as the binary did.
|
|
|
|
executable="$1"
|
|
shift
|
|
|
|
target_name=$(mktemp)
|
|
cp "$executable" "$target_name"
|
|
chmod +x "$target_name"
|
|
|
|
"$target_name" "$@"
|
|
rc=$?
|
|
rm "$target_name"
|
|
exit $rc
|