akhayyat/dotfiles

install.sh: fix check for firefox and thunderbird default profile directories

Commit fdec24af02e7 · Ahmad Khayyat · 2022-12-03 17:53 +0300

Changeset
fdec24af02e76f0a54c769a592657af7b3fdfc6d

View source at this commit

install.sh: fix check for firefox and thunderbird default profile directories

If the directory does not exist, the quotes are required for the test to fail.

Comments

No comments yet.

Log in to comment

Diff

diff --git a/install.sh b/install.sh
--- a/install.sh
+++ b/install.sh
@@ -72,14 +72,14 @@
 link_and_check $PWD/gpg.conf              $HOME/.gnupg/gpg.conf
 
 thunderbird_default_profile=$(ls -d $HOME/.thunderbird/*.default)
-if [ -d $thunderbird_default_profile ]
+if [ -d "$thunderbird_default_profile" ]
 then
     mkdir -p $thunderbird_default_profile/chrome
     link_and_check $PWD/thunderbird-userChrome.css $thunderbird_default_profile/chrome/userChrome.css
 fi
 
 firefox_default_profile=$(ls -d $HOME/.mozilla/firefox/*.default)
-if [ -d $firefox_default_profile ]
+if [ -d "$firefox_default_profile" ]
 then
     mkdir -p $firefox_default_profile/chrome
     link_and_check $PWD/firefox-userChrome.css $firefox_default_profile/chrome/userChrome.css