From c79821ebc0dc192e2dfd9500c9c7be4aef070892 Mon Sep 17 00:00:00 2001 From: Gabe Date: Mon, 12 Oct 2026 22:29:41 +0000 Subject: [PATCH] Update Bash Scripts/Install_Programs.sh --- Bash Scripts/Install_Programs.sh | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/Bash Scripts/Install_Programs.sh b/Bash Scripts/Install_Programs.sh index d9308f3..d330991 100644 --- a/Bash Scripts/Install_Programs.sh +++ b/Bash Scripts/Install_Programs.sh @@ -5,6 +5,7 @@ set -e command -v apt >/dev/null 2>&1 || { echo "apt not found, this script is for Debian-based distros"; exit 1; } +[ "$(id -u)" -ne 0 ] || { echo "Run this as your normal user (not root or sudo); it calls sudo itself."; exit 1; } . /etc/os-release ARCH=$(dpkg --print-architecture) @@ -95,7 +96,7 @@ install_tlp () { sudo apt install -y tlp tlp-rdw # tlp-rdw needs NetworkManager; drop it if you don't use that sudo systemctl enable --now tlp.service sudo tlp-stat -s # should show "State = enabled" - sudo tlp-stat -b || true # exits non-zero with no battery (desktop/VM) + sudo tlp-stat -b || true echo } @@ -243,9 +244,6 @@ install_vscode () { mkdir -p "$VSCODE_USER_DIR" if curl -fsSL "$CONFIGS_URL/vscode/settings.json" -o "$WORKDIR/vscode-settings.json"; then - if [ -f "$VSCODE_USER_DIR/settings.json" ]; then - cp "$VSCODE_USER_DIR/settings.json" "$VSCODE_USER_DIR/settings.json.bak" - fi cp "$WORKDIR/vscode-settings.json" "$VSCODE_USER_DIR/settings.json" echo "Imported VS Code settings" else