Improve Check Profile (#25)

Added ability for different file paths (per OS) and fixed the Windows install (different ff  path)
This commit is contained in:
child_duckling 2020-08-15 21:20:00 -07:00 committed by GitHub
parent 1a5d6358bf
commit 803ab4d10b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 5 additions and 1 deletions

View File

@ -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() {