diff options
| author | Your Name <you@example.com> | 2026-02-20 23:41:18 +0800 |
|---|---|---|
| committer | Your Name <you@example.com> | 2026-02-20 23:41:18 +0800 |
| commit | 9abbbe2ea86984865d4f3114583f969949bb3e53 (patch) | |
| tree | a4e4e39160cf6a098cd55c4527ea16a3f6f16cc7 /setup/setup.sh | |
| parent | a9bfc96ce01a8b71425f30ce13e7bf12b5080367 (diff) | |
Make setup scripts idempotent
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Diffstat (limited to 'setup/setup.sh')
| -rwxr-xr-x | setup/setup.sh | 4 |
1 files changed, 2 insertions, 2 deletions
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 @@ | |||
| 3 | SCRIPT_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" &> /dev/null && pwd )" | 3 | SCRIPT_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" &> /dev/null && pwd )" |
| 4 | cd "$SCRIPT_DIR" || exit | 4 | cd "$SCRIPT_DIR" || exit |
| 5 | 5 | ||
| 6 | # Shell appearance | 6 | # Shell appearance (only append if not already present) |
| 7 | sudo tee -a /etc/bashrc > /dev/null << 'EOF' | 7 | grep -q 'di=38;5;135' /etc/bashrc || sudo tee -a /etc/bashrc > /dev/null << 'EOF' |
| 8 | LS_COLORS=$LS_COLORS:'di=38;5;135:ex=00;32:' ; export LS_COLORS | 8 | LS_COLORS=$LS_COLORS:'di=38;5;135:ex=00;32:' ; export LS_COLORS |
| 9 | PS1='[\[\033[01;32m\]\u\[\033[00m\]@\h \[\033[38;5;135m\]\W\[\033[00m\]]\$ ' | 9 | PS1='[\[\033[01;32m\]\u\[\033[00m\]@\h \[\033[38;5;135m\]\W\[\033[00m\]]\$ ' |
| 10 | export TERM=xterm-256color | 10 | export TERM=xterm-256color |
