Rename $OS to $SXMO_OS.

This commit is contained in:
Peter John Hartman
2023-04-04 10:24:55 -05:00
parent 2f2a4b21de
commit 7965c0c2e0
6 changed files with 10 additions and 20 deletions

View File

@@ -52,7 +52,7 @@ _device_list() {
}
_restart_bluetooth() {
case "$OS" in
case "$SXMO_OS" in
alpine|postmarketos)
doas rc-service bluetooth restart
;;

View File

@@ -7,19 +7,9 @@
# shellcheck source=scripts/core/sxmo_common.sh
. sxmo_common.sh
# see sxmo_common.sh
if [ -e /etc/os-release ]; then
# shellcheck source=/dev/null
. /etc/os-release
elif [ -e /usr/lib/os-release ]; then
# shellcheck source=/dev/null
. /usr/lib/os-release
fi
export OS="${ID:-unknown}"
on() {
rfkill unblock bluetooth
case "$OS" in
case "$SXMO_OS" in
alpine|postmarketos)
rc-service bluetooth start
rc-update add bluetooth
@@ -32,7 +22,7 @@ on() {
}
off() {
case "$OS" in
case "$SXMO_OS" in
alpine|postmarketos)
rc-service bluetooth stop
rc-update del bluetooth

View File

@@ -39,7 +39,7 @@ if [ $# -gt 0 ]; then
trap "read -r" EXIT
set -e
case "$OS" in
case "$SXMO_OS" in
alpine|postmarketos) change_alpine "$@";;
arch|archarm|debian) change_systemd "$@";;
nixos) echo "Change the timezone in configuration.nix with time.timeZone = \"[timezone]\"";;

View File

@@ -36,7 +36,7 @@ update_nixos() {
sxmo_wakelock.sh lock upgrading infinite
case "$OS" in
case "$SXMO_OS" in
alpine|postmarketos) update_apk;;
arch|archarm) update_pacman;;
nixos) update_nixos;;