feat: add bds core, locale updates and safety fixes

This commit is contained in:
2026-05-31 14:01:34 +03:00
parent d1686355e8
commit c769140913
34 changed files with 1535 additions and 12 deletions

33
lib/detect.sh Normal file
View File

@@ -0,0 +1,33 @@
#!/usr/bin/env bash
detect_system() {
if [[ -f /etc/os-release ]]; then
# shellcheck disable=SC1091
. /etc/os-release
OS_ID="${ID:-unknown}"
OS_VERSION="${VERSION_ID:-unknown}"
OS_NAME="${PRETTY_NAME:-unknown}"
else
fail "$(t detect_os_failed)"
fi
ARCHITECTURE="$(uname -m)"
if command -v apt-get >/dev/null 2>&1; then
PKG_MANAGER="apt"
elif command -v dnf >/dev/null 2>&1; then
PKG_MANAGER="dnf"
elif command -v yum >/dev/null 2>&1; then
PKG_MANAGER="yum"
elif command -v pacman >/dev/null 2>&1; then
PKG_MANAGER="pacman"
else
fail "$(t no_package_manager)"
fi
if command -v systemctl >/dev/null 2>&1; then
INIT_SYSTEM="systemd"
else
INIT_SYSTEM="none"
fi
}