From 9abbbe2ea86984865d4f3114583f969949bb3e53 Mon Sep 17 00:00:00 2001 From: Your Name Date: Fri, 20 Feb 2026 23:41:18 +0800 Subject: Make setup scripts idempotent Co-Authored-By: Claude Opus 4.6 --- setup/setup.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'setup/setup.sh') diff --git a/setup/setup.sh b/setup/setup.sh index d5c009b..731310e 100755 --- a/setup/setup.sh +++ b/setup/setup.sh @@ -3,8 +3,8 @@ SCRIPT_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" &> /dev/null && pwd )" cd "$SCRIPT_DIR" || exit -# Shell appearance -sudo tee -a /etc/bashrc > /dev/null << 'EOF' +# Shell appearance (only append if not already present) +grep -q 'di=38;5;135' /etc/bashrc || sudo tee -a /etc/bashrc > /dev/null << 'EOF' LS_COLORS=$LS_COLORS:'di=38;5;135:ex=00;32:' ; export LS_COLORS PS1='[\[\033[01;32m\]\u\[\033[00m\]@\h \[\033[38;5;135m\]\W\[\033[00m\]]\$ ' export TERM=xterm-256color -- cgit