Don't update firefox again if it's already been pulled today

This commit is contained in:
Sage Vaillancourt 2024-06-29 10:09:25 -04:00
parent 8f3f1662d3
commit d7c5ac1d5e
1 changed files with 9 additions and 1 deletions

View File

@ -1,7 +1,15 @@
#!/bin/bash
RUN_FIREFOX="MOZ_ENABLE_WAYLAND=1 setsid $HOME/.bin/firefox-developer-edition/firefox-bin"
kill $(pgrep firefox)
gnome-terminal -- bash -c "$HOME/.bin/update-firefox.sh && MOZ_ENABLE_WAYLAND=1 setsid $HOME/.bin/firefox-developer-edition/firefox-bin"
current_date="$(date '+%D')"
if [[ "$current_date" == "$(cat "$HOME/.bin/.update-firefox-last-pull")" ]]; then
gnome-terminal -- bash -c "$RUN_FIREFOX"
else
gnome-terminal -- bash -c "$HOME/.bin/update-firefox.sh && $RUN_FIREFOX"
fi
test -f "$HOME/.aws.exp" && bash -c "sleep 10; $HOME/.aws.exp" &> "$HOME/.aws.exp.log"
echo "$current_date" > "$HOME/.bin/.update-firefox-last-pull"
wait