only update user.js if there is a new arkenfox
This commit is contained in:
parent
7bfad45303
commit
50035ee2f2
|
@ -18,8 +18,14 @@ command -v apt 1>/dev/null 2>&1 && sudo apt upgrade
|
||||||
|
|
||||||
command -v xbps-install 1>/dev/null 2>&1 && sudo xbps-install -Syu && pkill -RTMIN+8 "${STATUSBAR:-dwmblocks}"
|
command -v xbps-install 1>/dev/null 2>&1 && sudo xbps-install -Syu && pkill -RTMIN+8 "${STATUSBAR:-dwmblocks}"
|
||||||
|
|
||||||
printf "%b" "$BOLD${BLUE}Updating arkenfox...$NC\n"
|
|
||||||
"$DOTS_DIR/.local/share/firefox/updater.sh" -b
|
newversion=$(grep -oP '(?<=\* version: )\d\d\d' "$(DISPLAY=invalid "$DOTS_DIR"/.local/share/firefox/updater.sh -r 2>/dev/null | grep -oP '(?<=Warning: user.js was saved to temporary file )/tmp/tmp\.\w+\.js')")
|
||||||
|
oldversion=$(grep -oP '(?<=\* version: )\d\d\d' "$DOTS_DIR"/.local/share/firefox/user.js)
|
||||||
|
|
||||||
|
if [ $newversion -gt $oldversion ]; then
|
||||||
|
printf "%b" "$BOLD${BLUE}Updating arkenfox...$NC\n"
|
||||||
|
"$DOTS_DIR/.local/share/firefox/updater.sh" -b
|
||||||
|
fi
|
||||||
|
|
||||||
printf "%b" "$BOLD${BLUE}Upgrade complete.\nPress <Enter> to exit window.\n"
|
printf "%b" "$BOLD${BLUE}Upgrade complete.\nPress <Enter> to exit window.\n"
|
||||||
read -r _
|
read -r _
|
||||||
|
|
Loading…
Reference in New Issue