Skip to content

Commit

Permalink
Linux: add quotes around PROFILE_ROOTDIR directories
Browse files Browse the repository at this point in the history
  • Loading branch information
DanielSGH committed Dec 31, 2023
1 parent 272b2c2 commit 112d334
Showing 1 changed file with 5 additions and 6 deletions.
11 changes: 5 additions & 6 deletions install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ RED='\033[0;31m'
# UTILITY FUNCTIONS
set_pref() {
echo "setting $1 to $2 in user.js";
echo "user_pref(\"$1\", $2);" >> $PROFILE_ROOTDIR/user.js;
echo "user_pref(\"$1\", $2);" >> "$PROFILE_ROOTDIR/user.js";
}

delete_pref() {
Expand Down Expand Up @@ -141,11 +141,11 @@ if ! curl -L "https://github.com/bmFtZQ/edge-frfox/archive/refs/heads/main.tar.g
fi

echo "Copying theme folder...";
cp -r $TMP_DIR/chrome $PROFILE_ROOTDIR;
cp -r $TMP_DIR/chrome "$PROFILE_ROOTDIR";
cat $TMP_DIR/user.js |
while read line; do
if ! grep -qF "$line" $PROFILE_ROOTDIR/user.js; then
echo "$line" | tee -a $PROFILE_ROOTDIR/user.js >/dev/null;
if ! grep -qF "$line" "$PROFILE_ROOTDIR/user.js"; then
echo "$line" >> "$PROFILE_ROOTDIR/user.js"
fi;
done;

Expand All @@ -155,7 +155,7 @@ cat $TMP_DIR/user.js |

echo "Optional settings, refer to https://github.com/bmFtZQ/edge-frfox/tree/main#how-to-install";
for ((i = 0; i < ${#OPTIONALS[@]}; i += 2)); do
if grep -qF "user_pref(\"${OPTIONALS[i]}\", ${OPTIONALS[i+1]});" $PROFILE_ROOTDIR/user.js; then
if grep -qF "user_pref(\"${OPTIONALS[i]}\", ${OPTIONALS[i+1]});" "$PROFILE_ROOTDIR/user.js"; then
continue;
fi;

Expand All @@ -167,5 +167,4 @@ for ((i = 0; i < ${#OPTIONALS[@]}; i += 2)); do

done;


echo -e "${GREEN}Finished successfully! Please start firefox to see the changes.";

0 comments on commit 112d334

Please sign in to comment.