Skip to content

Commit c5776cb

Browse files
AnnatarHeclaude
andauthored
feat(install): rename old manual binaries to .bak after Homebrew install (#8)
When migrating from manual install to Homebrew, rename existing ~/.shelltime/bin/shelltime and shelltime-daemon with .bak suffix so the shell resolves to the Homebrew-managed version instead. Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
1 parent 3cf6db8 commit c5776cb

1 file changed

Lines changed: 9 additions & 0 deletions

File tree

install.bash

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,15 @@ if [[ "$OS" == "Darwin" ]] && command_exists brew; then
2424
if brew install shelltime/tap/shelltime; then
2525
BREW_INSTALLED=true
2626
echo "Successfully installed shelltime via Homebrew."
27+
# Rename old manual-install binaries so the system uses the Homebrew version
28+
if [ -f "$HOME/.shelltime/bin/shelltime" ]; then
29+
mv "$HOME/.shelltime/bin/shelltime" "$HOME/.shelltime/bin/shelltime.bak"
30+
echo "Renamed ~/.shelltime/bin/shelltime to shelltime.bak (now using Homebrew version)"
31+
fi
32+
if [ -f "$HOME/.shelltime/bin/shelltime-daemon" ]; then
33+
mv "$HOME/.shelltime/bin/shelltime-daemon" "$HOME/.shelltime/bin/shelltime-daemon.bak"
34+
echo "Renamed ~/.shelltime/bin/shelltime-daemon to shelltime-daemon.bak (now using Homebrew version)"
35+
fi
2736
else
2837
echo "Homebrew installation failed. Falling back to manual installation..."
2938
fi

0 commit comments

Comments
 (0)