From 4c3f26de53d6cb129cd0b62e82cb510e93586523 Mon Sep 17 00:00:00 2001 From: Marc Herbert Date: Sun, 25 Sep 2022 17:51:39 -0700 Subject: [PATCH] install.sh: add Darwin test workaround Easy to extend to xBSD or other if needed. Signed-off-by: Marc Herbert --- install.sh | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/install.sh b/install.sh index 0e673da..fa932bb 100755 --- a/install.sh +++ b/install.sh @@ -46,7 +46,12 @@ main() for sdir in sof sof-ipc4 sof-ace-tplg sof-tplg; do if test -e "$path/$sdir${optversuffix}" ; then - ( set -x; ln -sT "$sdir-$ver" "${FW_DEST}/$sdir" ) || { + # Test workaround. Currently enough to run the whole test suite on Darwin + case "$(uname)" in + Darwin) safer_ln=;; + *) safer_ln='--no-target-directory';; + esac + ( set -x; ln -s $safer_ln "$sdir-$ver" "${FW_DEST}/$sdir" ) || { set +x die '%s already installed? (Re)move it first.\n' "${FW_DEST}/$sdir" }