Install tzupdate on demand

This commit is contained in:
David Heinemeier Hansson 2025-08-24 16:36:10 +02:00
parent 4fd6a110ea
commit 028c07d016
2 changed files with 6 additions and 5 deletions

View File

@ -1,5 +1,9 @@
#!/bin/bash
if ! command -v tzupdate &>/dev/null; then
yay -S --noconfirm --needed tzupdate
fi
sudo tzupdate
new_timezone=$(timedatectl show -p Timezone --value)
omarchy-restart-waybar

View File

@ -1,9 +1,6 @@
#!/bin/bash
if ! command -v tzupdate &>/dev/null; then
yay -S --noconfirm --needed tzupdate
sudo tee /etc/sudoers.d/omarchy-tzupdate >/dev/null <<EOF
%wheel ALL=(root) NOPASSWD: /usr/bin/tzupdate, /usr/bin/timedatectl
EOF
sudo chmod 0440 /etc/sudoers.d/omarchy-tzupdate
fi