Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 10 additions & 1 deletion install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -235,8 +235,17 @@ if [ ! -d "$INSTALL_DIR" ]; then
fi

# Move the executable to the install directory and make it executable
# The zip may contain either 'Luca' (uppercase) or 'luca' (lowercase) depending on the release
echo "🚀 Installing $TOOL_NAME to $INSTALL_DIR..."
sudo_if_install_dir_not_writeable "mv $TOOL_NAME $EXECUTABLE_FILE"
if [ -f "$TOOL_NAME" ]; then
EXTRACTED_BIN="$TOOL_NAME"
elif [ -f "$BIN_NAME" ]; then
EXTRACTED_BIN="$BIN_NAME"
else
echo "❌ ERROR: Could not find extracted binary (expected '$TOOL_NAME' or '$BIN_NAME')"
exit 1
fi
sudo_if_install_dir_not_writeable "mv $EXTRACTED_BIN $EXECUTABLE_FILE"
sudo_if_install_dir_not_writeable "chmod +x $EXECUTABLE_FILE"

echo "✅ $TOOL_NAME ($REQUIRED_EXECUTABLE_VERSION) successfully installed to $INSTALL_DIR"
Expand Down
10 changes: 9 additions & 1 deletion uninstall.sh
Original file line number Diff line number Diff line change
Expand Up @@ -8,11 +8,19 @@
# =============================================================================

TOOL_NAME="Luca"
BIN_NAME="luca"
INSTALL_DIR="${INSTALL_DIR:-/usr/local/bin}"
TOOL_FOLDER=".luca"
TOOL_DIR="$HOME/$TOOL_FOLDER"
SHELL_HOOK_SCRIPT_PATH="$TOOL_DIR/shell_hook.sh"
EXECUTABLE_FILE="$INSTALL_DIR/$TOOL_NAME"
# The binary may be installed as 'luca' (lowercase) or 'Luca' (uppercase) depending on the version
if [ -f "$INSTALL_DIR/$BIN_NAME" ]; then
EXECUTABLE_FILE="$INSTALL_DIR/$BIN_NAME"
elif [ -f "$INSTALL_DIR/$TOOL_NAME" ]; then
EXECUTABLE_FILE="$INSTALL_DIR/$TOOL_NAME"
else
EXECUTABLE_FILE="$INSTALL_DIR/$BIN_NAME"
fi

# =============================================================================
# TERMINAL COLORS
Expand Down
Loading