From 57a0bc5dfcbca2e76cbbb14caa1590ab283a2bfe Mon Sep 17 00:00:00 2001 From: David Biancolin Date: Tue, 3 Nov 2020 12:14:02 -0500 Subject: [PATCH] Fix zsh compatibility in init-submodules-no-rv-tools (#705) --- scripts/init-submodules-no-riscv-tools-nolog.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/init-submodules-no-riscv-tools-nolog.sh b/scripts/init-submodules-no-riscv-tools-nolog.sh index cede5e47d3..c861658dfa 100755 --- a/scripts/init-submodules-no-riscv-tools-nolog.sh +++ b/scripts/init-submodules-no-riscv-tools-nolog.sh @@ -77,6 +77,6 @@ if [ ! -f ./software/firemarshal/marshal-config.yaml ]; then fi echo "# line auto-generated by init-submodules-no-riscv-tools.sh" >> env.sh -echo '__DIR="$(dirname "$(readlink -f "${BASH_SOURCE[0]}")")"' >> env.sh +echo '__DIR="$(dirname "$(readlink -f "${BASH_SOURCE[0]:-${(%):-%x}}")")"' >> env.sh echo "PATH=\$__DIR/bin:\$PATH" >> env.sh echo "PATH=\$__DIR/software/firemarshal:\$PATH" >> env.sh