Files
bananarchy/overlay/rootfs/usr/bin/sxmo_timezonechange.sh
T
Luxferre 5eb8be223d fix(sxmo): simplify sxmo_timezonechange.sh to always use the Alpine flow
SXMO_OS is always bananarchy (an Alpine derivative) on this device, so
the SXMO_OS case, the change_systemd branch, and the nixos branch were
dead code. Drop them and always run the Alpine flow
(doas setup-timezone -z), which is what bananarchy uses.
2026-10-22 23:54:45 +03:00

37 lines
617 B
Bash
Executable File

#!/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 "$@"
else
menu
fi