From 14e27756b1a1e843787d7edbdfe7daadd32c86f4 Mon Sep 17 00:00:00 2001 From: Florent Rougon Date: Fri, 25 Nov 2022 09:03:50 +0100 Subject: [PATCH] download_and_compile.sh: new generated wrapper script named 'run' This new script is created by download_and_compile.sh in the same way as run_fgfs.sh and friends. It changes the current directory to $d/install, where $d is the directory containing the 'run' script. Then it sets LD_LIBRARY_PATH in the same way as run_fgfs.sh. Finally, it runs the command formed of all arguments passed to it. This can be used for instance to run SimGear tests with the proper LD_LIBRARY_PATH setting: assuming SimGear has been built by download_and_compile.sh and you are in the directory from which download_and_compile.sh was run, you can do: cd build/simgear ../../run ctest --output-on-failure --- download_and_compile.sh | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/download_and_compile.sh b/download_and_compile.sh index 42223d7..6d779a9 100755 --- a/download_and_compile.sh +++ b/download_and_compile.sh @@ -1621,6 +1621,17 @@ ldd "\$@" EndOfScriptText chmod 755 "$SCRIPT" + # Generic wrapper for whatever the user wants to run (ctest, make...) + SCRIPT=run + cat >"$SCRIPT" < $SCRIPT echo "cd \"\$(dirname \"\$0\")\"" >> $SCRIPT