Backup user.js instead of overwriting it (#30)

This commit is contained in:
Brod8362 2020-08-21 16:40:06 -05:00 committed by GitHub
parent f65e7ad45b
commit 8458666e29
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 8 additions and 1 deletions

View File

@ -29,7 +29,7 @@
+ You need `bash` to run it.
+ If you have an existing chrome folder, the script will make a backup of it in your profile directory.
+ If the installation script is not working, feel free to submit an issue or a pull request.
+ The script will move a file named `user.js` that contains all the preferences needed for blurredfox to work. If you have a current one, make sure to create a backup.
+ The script will move a file named `user.js` that contains all the preferences needed for blurredfox to work. The existing one will be copied to `user.js.bak`.
1. Run the script below. If you are using a different build like nightly, beta, etc., make sure to replace the 'stable' with the Firefox Build you are using. If leave empty, it will default to stable.

View File

@ -22,6 +22,13 @@ download_bf() {
FF_THEME="/tmp/blurredfox-master/"
cp -r "${FF_THEME}"* "${CHROME_DIRECTORY}"
# Backup user.js instead of overwriting it
if [ -e "${CHROME_DIRECTORY}/user.js" ]
then
message "[>>] Backing up user.js to user.js.bak..."
cp "${CHROME_DIRECTORY}/user.js" "${CHROME_DIRECTORY}/user.js.bak"
fi
# Move user.js to the main profile directory
mv "${CHROME_DIRECTORY}/user.js" "../"