1
0
Fork 0
apt/CMake/run_if_exists.sh
Daniel Baumann 6810ba718b
Adding upstream version 3.0.2.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
2025-06-20 21:10:43 +02:00

16 lines
231 B
Bash
Executable file

#!/bin/sh
# Small helper for running a command
out=""
if [ "$1" = "--stdout" ]; then
out="$2"
shift 2
fi
if [ -e "$1" ]; then
shift
if [ "$out" ]; then
exec "$@" > $out
else
exec "$@"
fi
fi