feat: git init
This commit is contained in:
27
install.sh
Executable file
27
install.sh
Executable file
@@ -0,0 +1,27 @@
|
||||
#!/bin/bash
|
||||
set -e
|
||||
|
||||
SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
|
||||
INSTALL_DIR="$HOME/.local/bin"
|
||||
|
||||
cd "$SCRIPT_DIR"
|
||||
|
||||
VERSION="$(cat "$SCRIPT_DIR/VERSION")"
|
||||
|
||||
echo "Building transcribe (version: $VERSION)..."
|
||||
go build -ldflags "-X transcribe/cmd.Version=$VERSION" -o transcribe .
|
||||
|
||||
echo "Installing to $INSTALL_DIR..."
|
||||
mkdir -p "$INSTALL_DIR"
|
||||
cp transcribe "$INSTALL_DIR/"
|
||||
chmod +x "$INSTALL_DIR/transcribe"
|
||||
|
||||
if [[ ":$PATH:" != *":$HOME/.local/bin:"* ]]; then
|
||||
echo ""
|
||||
echo "Warning: ~/.local/bin is not in your PATH"
|
||||
echo "Add this to your shell rc file (e.g., ~/.bashrc or ~/.zshrc):"
|
||||
echo ' export PATH="$HOME/.local/bin:$PATH"'
|
||||
fi
|
||||
|
||||
echo ""
|
||||
echo "Installed successfully!"
|
||||
Reference in New Issue
Block a user