Skip to content

Commit 93eb9bb

Browse files
committed
scripts: use local directory if workspace not defined.
Determine workspace if environment variable not defined. Signed-off-by: Liam Girdwood <liam.r.girdwood@linux.intel.com>
1 parent 1658a9c commit 93eb9bb

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

scripts/sof-testbench-helper.sh

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -32,8 +32,11 @@ usage() {
3232
}
3333

3434
if [ -z "${SOF_WORKSPACE}" ]; then
35-
echo "Error: environment variable SOF_WORKSPACE need to be set to top level sof directory"
36-
exit 1
35+
# fallback to the script directory default path
36+
SCRIPT_DIR=$(cd "$(dirname "$0")" && pwd)
37+
SOF_REPO=$(dirname "$SCRIPT_DIR")
38+
SOF_WORKSPACE="$SOF_REPO/../"
39+
echo "Using default SOF environment at $SOF_WORKSPACE"
3740
fi
3841

3942
OUTWAV=

0 commit comments

Comments
 (0)