Files
bananarchy/overlay/rootfs/usr/bin/sxmo_timezonechange.sh
T

37 lines
617 B
Bash
Raw Normal View History

2026-10-19 09:23:54 +03:00
#!/bin/sh
# SPDX-License-Identifier: AGPL-3.0-only
# Copyright 2022 Sxmo Contributors
# include common definitions
# shellcheck source=scripts/core/sxmo_common.sh
. sxmo_common.sh
change_alpine() {
echo "Changing timezone to $1"
doas setup-timezone -z "$1"
sxmo_hook_statusbar.sh time
echo "Timezone changed ok"
}
menu() {
zoneinfo_dir=$(xdg_data_path zoneinfo)
T="$(
find "$zoneinfo_dir" -type f |
sed "s#^${zoneinfo_dir}/##g" |
sort |
sxmo_dmenu.sh -p Timezone -i
)" || exit 0
sxmo_terminal.sh "$0" "$T"
}
if [ $# -gt 0 ]; then
trap "read -r" EXIT
set -e
change_alpine "$@"
2026-10-19 09:23:54 +03:00
else
menu
fi