Dotfiles update 2025-12-22 12:31
This commit is contained in:
@@ -3,7 +3,8 @@
|
|||||||
# Dotfiles Health Check (Arch/CachyOS)
|
# Dotfiles Health Check (Arch/CachyOS)
|
||||||
# ============================================================================
|
# ============================================================================
|
||||||
|
|
||||||
set -e
|
# Note: Not using set -e because arithmetic operations like ((var++))
|
||||||
|
# return 1 when var was 0, which would cause premature exit
|
||||||
|
|
||||||
readonly DOTFILES_HOME="${DOTFILES_HOME:-$HOME/.dotfiles}"
|
readonly DOTFILES_HOME="${DOTFILES_HOME:-$HOME/.dotfiles}"
|
||||||
readonly DOTFILES_VERSION="3.0.0"
|
readonly DOTFILES_VERSION="3.0.0"
|
||||||
@@ -54,20 +55,20 @@ print_section() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
check_pass() {
|
check_pass() {
|
||||||
((PASSED_CHECKS++))
|
PASSED_CHECKS=$((PASSED_CHECKS + 1))
|
||||||
((TOTAL_CHECKS++))
|
TOTAL_CHECKS=$((TOTAL_CHECKS + 1))
|
||||||
echo -e " ${DF_GREEN}✓${DF_NC} $1"
|
echo -e " ${DF_GREEN}✓${DF_NC} $1"
|
||||||
}
|
}
|
||||||
|
|
||||||
check_fail() {
|
check_fail() {
|
||||||
((FAILED_CHECKS++))
|
FAILED_CHECKS=$((FAILED_CHECKS + 1))
|
||||||
((TOTAL_CHECKS++))
|
TOTAL_CHECKS=$((TOTAL_CHECKS + 1))
|
||||||
echo -e " ${DF_RED}✗${DF_NC} $1"
|
echo -e " ${DF_RED}✗${DF_NC} $1"
|
||||||
}
|
}
|
||||||
|
|
||||||
check_warn() {
|
check_warn() {
|
||||||
((WARNING_CHECKS++))
|
WARNING_CHECKS=$((WARNING_CHECKS + 1))
|
||||||
((TOTAL_CHECKS++))
|
TOTAL_CHECKS=$((TOTAL_CHECKS + 1))
|
||||||
echo -e " ${DF_YELLOW}⚠${DF_NC} $1"
|
echo -e " ${DF_YELLOW}⚠${DF_NC} $1"
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -79,7 +80,7 @@ check_os() {
|
|||||||
print_section "Operating System"
|
print_section "Operating System"
|
||||||
|
|
||||||
if [[ "$OSTYPE" == "linux-gnu" ]]; then
|
if [[ "$OSTYPE" == "linux-gnu" ]]; then
|
||||||
if grep -qiI "arch\|cachyos" /etc/os-release 2>/dev/null; then
|
if grep -qi "arch\|cachyos" /etc/os-release 2>/dev/null; then
|
||||||
check_pass "Running on Arch/CachyOS"
|
check_pass "Running on Arch/CachyOS"
|
||||||
else
|
else
|
||||||
check_fail "Not running on Arch/CachyOS"
|
check_fail "Not running on Arch/CachyOS"
|
||||||
|
|||||||
Reference in New Issue
Block a user