From 803ab4d10bf38fda86681d054f928e7a07c6f46c Mon Sep 17 00:00:00 2001 From: child_duckling <19170969+child-duckling@users.noreply.github.com> Date: Sat, 15 Aug 2020 21:20:00 -0700 Subject: [PATCH] Improve Check Profile (#25) Added ability for different file paths (per OS) and fixed the Windows install (different ff path) --- install.sh | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/install.sh b/install.sh index 78b0be4..14e68f6 100755 --- a/install.sh +++ b/install.sh @@ -45,7 +45,11 @@ download_bf() { } function check_profile() { - FF_USER_DIRECTORY="$(find "${HOME}/.mozilla/firefox/" -maxdepth 1 -type d -regextype egrep -regex '.*[a-zA-Z0-9]+.'${1})" + case "$OSTYPE" in #Different Paths in Windows compared to Linux + msys*) FF_USER_DIRECTORY="$(find "${HOME}AppData\Roaming\Mozilla\firefox" -maxdepth 1 -type d -regextype egrep -regex '.*[a-zA-Z0-9]+.'${1})" ;; + *) FF_USER_DIRECTORY="$(find "${HOME}/.mozilla/firefox/" -maxdepth 1 -type d -regextype egrep -regex '.*[a-zA-Z0-9]+.'${1})" ;; + esac + } function print_args() {