1
0
Fork 0

updater: use local user.js file

This commit is contained in:
Michel 2022-01-11 17:48:46 +01:00
parent 7368cf81b7
commit 937a0a0969
1 changed files with 3 additions and 3 deletions

View File

@ -241,7 +241,7 @@ remove_comments() { # expects 2 arguments: from-file and to-file
# Applies latest version of user.js and any custom overrides
update_userjs() {
declare -r newfile="$(download_file 'https://raw.githubusercontent.com/arkenfox/user.js/master/user.js')"
declare -r newfile="$HOME/.mozilla/firefox/user.js"
[ -z "${newfile}" ] && echo -e "${RED}Error! Could not download user.js${NC}" && return 1 # check if download failed
echo -e "Please observe the following information:
@ -255,7 +255,7 @@ update_userjs() {
echo -e "\n"
if [[ $REPLY =~ ^[Nn]$ ]]; then
echo -e "${RED}Process aborted${NC}"
rm "$newfile"
#rm $newfile
return 1
fi
fi
@ -272,7 +272,7 @@ update_userjs() {
[ "$BACKUP" = 'single' ] && bakname='userjs_backups/user.js.backup'
cp user.js "$bakname" &>/dev/null
mv "${newfile}" user.js
cp "${newfile}" user.js
echo -e "Status: ${GREEN}user.js has been backed up and replaced with the latest version!${NC}"
if [ "$ESR" = true ]; then