perf: install env checks

This commit is contained in:
2025-12-23 20:53:55 +02:00
parent a286817ce3
commit 891ae505f8
30 changed files with 492 additions and 490 deletions

View File

@@ -5,14 +5,16 @@
# Print operating system information and hint which installer path will run.
#
if [[ "$OSTYPE" == "darwin"* ]]; then
log_info "Environment: DOTS_OS=$DOTS_OS, DOTS_PKG=$DOTS_PKG, DOTS_ENV=$DOTS_ENV"
if [[ "$DOTS_OS" == "macos" ]]; then
# macOS info
sw_vers
log_info "Detected macOS (OSTYPE=$OSTYPE)"
log_info "Package manager: Homebrew (brew)"
log_info "Code path: macOS-only brew scripts will run; Linux package scripts are skipped."
elif [[ "$OSTYPE" == "linux-gnu"* ]]; then
elif [[ "$DOTS_OS" == "linux" ]]; then
# Linux info
if [[ -r /etc/os-release ]]; then
cat /etc/os-release
@@ -21,17 +23,16 @@ elif [[ "$OSTYPE" == "linux-gnu"* ]]; then
fi
log_info "Detected Linux (OSTYPE=$OSTYPE, ID=${ID:-unknown}, ID_LIKE=${ID_LIKE:-n/a}, NAME=${NAME:-n/a}, VERSION_ID=${VERSION_ID:-n/a})"
log_info "Package manager detected: ${DOTS_PKG:-none}"
if command -v apt-get >/dev/null 2>&1; then
log_info "Package manager detected: apt-get"
export DOTS_PKG_MGR=apt
elif command -v pacman >/dev/null 2>&1; then
log_info "Package manager detected: pacman"
export DOTS_PKG_MGR=pacman
else
log_warn "No known package manager (apt-get/pacman) found on Linux."
if [[ -z "$DOTS_PKG" ]]; then
log_warn "No known package manager (apt-get/pacman/dnf) found on Linux."
fi
else
log_error "Unknown OS: $OSTYPE"
fi
if [[ "$DOTS_ENV" == "codespaces" ]]; then
log_info "Running in GitHub Codespaces"
fi