diff --git a/CLAUDE.md b/CLAUDE.md index b940f27..ba23357 100644 --- a/CLAUDE.md +++ b/CLAUDE.md @@ -23,8 +23,17 @@ just build-rust # Builds rust/target/release/mail2couch-rs # Build optimized release versions just build-release -# Install both binaries to /usr/local/bin -sudo just install +# Install both binaries to ~/bin (user-local) +just install + +# Install both binaries to /usr/local/bin (system-wide) +sudo just system-install + +# Uninstall from ~/bin +just uninstall + +# Uninstall from /usr/local/bin +sudo just system-uninstall # Run tests for both implementations just test diff --git a/IMPLEMENTATION_COMPARISON.md b/IMPLEMENTATION_COMPARISON.md index 92ab4ae..4288f27 100644 --- a/IMPLEMENTATION_COMPARISON.md +++ b/IMPLEMENTATION_COMPARISON.md @@ -493,13 +493,13 @@ export MAIL2COUCH_LOG_FORMAT=json ### Universal Installation ```bash -# Build and install both implementations -just build-release -sudo just install +# Build and install both implementations (user-local) +just install +# This installs to ~/bin/mail2couch-go and ~/bin/mail2couch-rs -# This installs: -# - /usr/local/bin/mail2couch-go -# - /usr/local/bin/mail2couch-rs +# Build and install both implementations (system-wide) +sudo just system-install +# This installs to /usr/local/bin/mail2couch-go and /usr/local/bin/mail2couch-rs ``` --- diff --git a/justfile b/justfile index a403f64..26b3101 100644 --- a/justfile +++ b/justfile @@ -31,14 +31,39 @@ build-go-release: # Build optimized Rust release (already built with --release above) build-rust-release: build-rust -# Install binaries to /usr/local/bin (requires sudo) +# Install binaries to ~/bin (user-local installation) install: build-release + @echo "Installing binaries to ~/bin..." + mkdir -p ~/bin + cp go/mail2couch-go ~/bin/ + cp rust/target/release/mail2couch-rs ~/bin/ + chmod +x ~/bin/mail2couch-go + chmod +x ~/bin/mail2couch-rs + @echo "✅ Installed mail2couch-go and mail2couch-rs to ~/bin" + @echo "💡 Make sure ~/bin is in your PATH" + +# Install binaries to /usr/local/bin (system-wide installation, requires sudo) +system-install: build-release @echo "Installing binaries to /usr/local/bin..." sudo cp go/mail2couch-go /usr/local/bin/ sudo cp rust/target/release/mail2couch-rs /usr/local/bin/ sudo chmod +x /usr/local/bin/mail2couch-go sudo chmod +x /usr/local/bin/mail2couch-rs - @echo "✅ Installed mail2couch-go and mail2couch-rs" + @echo "✅ Installed mail2couch-go and mail2couch-rs to /usr/local/bin" + +# Uninstall binaries from ~/bin +uninstall: + @echo "Uninstalling binaries from ~/bin..." + rm -f ~/bin/mail2couch-go + rm -f ~/bin/mail2couch-rs + @echo "✅ Uninstalled mail2couch-go and mail2couch-rs from ~/bin" + +# Uninstall binaries from /usr/local/bin (requires sudo) +system-uninstall: + @echo "Uninstalling binaries from /usr/local/bin..." + sudo rm -f /usr/local/bin/mail2couch-go + sudo rm -f /usr/local/bin/mail2couch-rs + @echo "✅ Uninstalled mail2couch-go and mail2couch-rs from /usr/local/bin" # Run tests for both implementations test: test-go test-rust