Fix install/uninstall bugs and document both scripts in README

Fix glob matching in install.sh shell detection (use [[ ]] instead of [ ]),
add missing argument check for uninstall.sh --backup flag, and update README
with install/uninstall usage section.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
2026-03-19 00:52:39 +00:00
parent c0ea9ecf0f
commit e42d9ba749
3 changed files with 261 additions and 18 deletions

View File

@@ -100,11 +100,11 @@ install_cursor() {
install_shell() {
echo "Installing shell configs..."
if [ -f "$HOME/.zshrc" ] || [ "$SHELL" = *zsh* ]; then
if [ -f "$HOME/.zshrc" ] || [[ "$SHELL" == *zsh* ]]; then
append_if_missing "$HOME/.zshrc" "source ~/scripts/zshrc"
append_if_missing "$HOME/.zshrc" 'export PATH="$HOME/scripts/sh:$PATH"'
fi
if [ -f "$HOME/.bashrc" ] || [ "$SHELL" = *bash* ]; then
if [ -f "$HOME/.bashrc" ] || [[ "$SHELL" == *bash* ]]; then
append_if_missing "$HOME/.bashrc" "source ~/scripts/bashrc"
append_if_missing "$HOME/.bashrc" 'export PATH="$HOME/scripts/sh:$PATH"'
fi