feat: updatetz

This commit is contained in:
ange 2024-10-23 12:22:08 +07:00
parent c430b6c12b
commit 769ee04d8b
Signed by: ange
GPG Key ID: 9E0C4157BB7BEB1D
2 changed files with 8 additions and 2 deletions

View File

@ -10,7 +10,7 @@ if [ -z "$1" ]; then
exit 1
fi
img="${aliases[$1]:-$1:latest}"
img="${aliases[$1]:-$1:latest}"; shift
set -x
podman run --rm -it -v "$PWD:/mnt/" -w /mnt/ "docker.io/$img"
podman run --rm -it -v "$PWD:/mnt/" -w /mnt/ "docker.io/$img" "$@"

6
.local/bin/updatetz Executable file
View File

@ -0,0 +1,6 @@
#!/bin/bash -e
tz="$(curl -Ssf https://ipapi.co/timezone)"
sudo timedatectl set-timezone "$tz"
echo "$tz"