feat: add pico shorthand symlink to build and install targets
This commit is contained in:
parent
c31af80182
commit
9ba4c530aa
1 changed files with 6 additions and 1 deletions
7
Makefile
7
Makefile
|
|
@ -82,6 +82,7 @@ build: generate
|
||||||
@$(GO) build $(GOFLAGS) $(LDFLAGS) -o $(BINARY_PATH) ./$(CMD_DIR)
|
@$(GO) build $(GOFLAGS) $(LDFLAGS) -o $(BINARY_PATH) ./$(CMD_DIR)
|
||||||
@echo "Build complete: $(BINARY_PATH)"
|
@echo "Build complete: $(BINARY_PATH)"
|
||||||
@ln -sf $(BINARY_NAME)-$(PLATFORM)-$(ARCH) $(BUILD_DIR)/$(BINARY_NAME)
|
@ln -sf $(BINARY_NAME)-$(PLATFORM)-$(ARCH) $(BUILD_DIR)/$(BINARY_NAME)
|
||||||
|
@ln -sf $(BINARY_NAME)-$(PLATFORM)-$(ARCH) $(BUILD_DIR)/pico
|
||||||
|
|
||||||
## build-all: Build picoclaw for all platforms
|
## build-all: Build picoclaw for all platforms
|
||||||
build-all: generate
|
build-all: generate
|
||||||
|
|
@ -95,20 +96,24 @@ build-all: generate
|
||||||
GOOS=windows GOARCH=amd64 $(GO) build $(LDFLAGS) -o $(BUILD_DIR)/$(BINARY_NAME)-windows-amd64.exe ./$(CMD_DIR)
|
GOOS=windows GOARCH=amd64 $(GO) build $(LDFLAGS) -o $(BUILD_DIR)/$(BINARY_NAME)-windows-amd64.exe ./$(CMD_DIR)
|
||||||
@echo "All builds complete"
|
@echo "All builds complete"
|
||||||
|
|
||||||
## install: Install picoclaw to system and copy builtin skills
|
## install: Install picoclaw to system and create pico shorthand
|
||||||
install: build
|
install: build
|
||||||
@echo "Installing $(BINARY_NAME)..."
|
@echo "Installing $(BINARY_NAME)..."
|
||||||
@mkdir -p $(INSTALL_BIN_DIR)
|
@mkdir -p $(INSTALL_BIN_DIR)
|
||||||
@cp $(BUILD_DIR)/$(BINARY_NAME) $(INSTALL_BIN_DIR)/$(BINARY_NAME)
|
@cp $(BUILD_DIR)/$(BINARY_NAME) $(INSTALL_BIN_DIR)/$(BINARY_NAME)
|
||||||
@chmod +x $(INSTALL_BIN_DIR)/$(BINARY_NAME)
|
@chmod +x $(INSTALL_BIN_DIR)/$(BINARY_NAME)
|
||||||
|
@ln -sf $(BINARY_NAME) $(INSTALL_BIN_DIR)/pico
|
||||||
@echo "Installed binary to $(INSTALL_BIN_DIR)/$(BINARY_NAME)"
|
@echo "Installed binary to $(INSTALL_BIN_DIR)/$(BINARY_NAME)"
|
||||||
|
@echo "Shorthand 'pico' -> $(INSTALL_BIN_DIR)/pico"
|
||||||
@echo "Installation complete!"
|
@echo "Installation complete!"
|
||||||
|
|
||||||
## uninstall: Remove picoclaw from system
|
## uninstall: Remove picoclaw from system
|
||||||
uninstall:
|
uninstall:
|
||||||
@echo "Uninstalling $(BINARY_NAME)..."
|
@echo "Uninstalling $(BINARY_NAME)..."
|
||||||
@rm -f $(INSTALL_BIN_DIR)/$(BINARY_NAME)
|
@rm -f $(INSTALL_BIN_DIR)/$(BINARY_NAME)
|
||||||
|
@rm -f $(INSTALL_BIN_DIR)/pico
|
||||||
@echo "Removed binary from $(INSTALL_BIN_DIR)/$(BINARY_NAME)"
|
@echo "Removed binary from $(INSTALL_BIN_DIR)/$(BINARY_NAME)"
|
||||||
|
@echo "Removed shorthand $(INSTALL_BIN_DIR)/pico"
|
||||||
@echo "Note: Only the executable file has been deleted."
|
@echo "Note: Only the executable file has been deleted."
|
||||||
@echo "If you need to delete all configurations (config.json, workspace, etc.), run 'make uninstall-all'"
|
@echo "If you need to delete all configurations (config.json, workspace, etc.), run 'make uninstall-all'"
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue