From ade283f861efaae684dc796c1ae9c5389780d1c8 Mon Sep 17 00:00:00 2001 From: ivaquero Date: Tue, 21 May 2024 09:19:49 +0800 Subject: [PATCH] fix a bug defaults.sh --- defaults.sh | 2 +- install.sh | 6 +++++- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/defaults.sh b/defaults.sh index 87a534d5..54ab806d 100644 --- a/defaults.sh +++ b/defaults.sh @@ -204,7 +204,7 @@ export OX_STARTUP=1 startup() { # start directory - cd "${HOME}"/Desktop || exit + cd "${HOME}" || exit } ########################################################## diff --git a/install.sh b/install.sh index 0090219c..63cfb5fd 100644 --- a/install.sh +++ b/install.sh @@ -87,7 +87,11 @@ case ${SHELL} in printf "📦 Installing latest Bash...\n" brew install bash bash-completion fi - export OX_SHELL=${HOME}/.profile + if [[ -f "${HOME}/.bashrc" ]]; then + export OX_SHELL=${HOME}/.bashrc + elif [[ -f "${HOME}/.bash_profile" ]]; then + export OX_SHELL=${HOME}/.profile + fi echo 'export BASH_SILENCE_DEPRECATION_WARNING=1' >>"${OX_SHELL}" ;; esac