From 851b6a097165af4d51c0db01b5e05256e5006896 Mon Sep 17 00:00:00 2001 From: Daniel Baumann Date: Sun, 7 Apr 2024 11:00:48 +0200 Subject: Adding upstream version 2.6.1. Signed-off-by: Daniel Baumann --- CMake/run_if_exists.sh | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) create mode 100755 CMake/run_if_exists.sh (limited to 'CMake/run_if_exists.sh') diff --git a/CMake/run_if_exists.sh b/CMake/run_if_exists.sh new file mode 100755 index 0000000..97edd4c --- /dev/null +++ b/CMake/run_if_exists.sh @@ -0,0 +1,16 @@ +#!/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 -- cgit v1.2.3