From 7d5fc1861a918e8ef94da8827458d4c2e4b784f4 Mon Sep 17 00:00:00 2001 From: younglim Date: Wed, 15 Mar 2023 15:24:39 +0800 Subject: [PATCH] Support path with spaces --- scripts/hats_shell.command | 4 ---- scripts/install_purple_dependencies.command | 4 +++- 2 files changed, 3 insertions(+), 5 deletions(-) diff --git a/scripts/hats_shell.command b/scripts/hats_shell.command index af17f211..128458d6 100755 --- a/scripts/hats_shell.command +++ b/scripts/hats_shell.command @@ -2,10 +2,6 @@ cd "$(dirname "${BASH_SOURCE[0]}")" -if [ ${PWD##*/} = "scripts" ]; then - cd .. -fi - source "$(dirname "$0")/hats_shell.sh" zsh diff --git a/scripts/install_purple_dependencies.command b/scripts/install_purple_dependencies.command index 63f02543..b4295020 100755 --- a/scripts/install_purple_dependencies.command +++ b/scripts/install_purple_dependencies.command @@ -2,8 +2,10 @@ cd "$(dirname "${BASH_SOURCE[0]}")" -if [ ${PWD##*/} = "scripts" ]; then +CURR_FOLDERNAME=$(basename $PWD) +if [ $CURR_FOLDERNAME = "scripts" ]; then cd .. + CURR_FOLDERNAME=$(basename $PWD) fi if ! [ -f nodejs-mac-arm64/bin/node ]; then