From 60dbb81883c333aae961bbd619727ce54e625bf9 Mon Sep 17 00:00:00 2001 From: Dave Page Date: Mon, 15 Mar 2021 15:27:17 +0000 Subject: [PATCH] Improve the shebang in the venv, so they work from any directory. --- pkg/mac/build-functions.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkg/mac/build-functions.sh b/pkg/mac/build-functions.sh index 92857e515..87e374013 100644 --- a/pkg/mac/build-functions.sh +++ b/pkg/mac/build-functions.sh @@ -87,7 +87,7 @@ _create_python_env() { # Fixup shebangs cd "${BUNDLE_DIR}/Contents/Frameworks/Python.framework/Versions/Current/bin" - grep -RiIl 'mac-build' * | xargs sed -i '' 's/\/.*\/python3\./.\/python3./g' + grep -RiIl 'mac-build' * | xargs sed -i '' 's/\/.*\/python3\./\$(dirname \"$0\")\/python3./g' # Remove some things we don't need cd "${BUNDLE_DIR}/Contents/Frameworks/Python.framework"