From 7ce7e740a0a7f01ea2eb630541c1e94d203b6ba3 Mon Sep 17 00:00:00 2001 From: lpf Date: Fri, 20 Feb 2026 19:00:35 +0800 Subject: [PATCH] fix Makefile --- Makefile | 69 -------------------------------------------------------- 1 file changed, 69 deletions(-) diff --git a/Makefile b/Makefile index 7fc02a2..1e41c73 100644 --- a/Makefile +++ b/Makefile @@ -115,81 +115,12 @@ install: build @cp $(BUILD_DIR)/$(BINARY_NAME) $(INSTALL_BIN_DIR)/$(BINARY_NAME) @chmod +x $(INSTALL_BIN_DIR)/$(BINARY_NAME) @echo "Installed binary to $(INSTALL_BIN_DIR)/$(BINARY_NAME)" - @echo "Installing builtin skills to $(WORKSPACE_SKILLS_DIR)..." - @mkdir -p $(WORKSPACE_SKILLS_DIR) - @for skill in $(BUILTIN_SKILLS_DIR)/*/; do \ - if [ -d "$$skill" ]; then \ - skill_name=$$(basename "$$skill"); \ - if [ -f "$$skill/SKILL.md" ]; then \ - cp -r "$$skill" $(WORKSPACE_SKILLS_DIR); \ - echo " ✓ Installed skill: $$skill_name"; \ - fi; \ - fi; \ - done - @$(MAKE) install-bootstrap-docs @echo "Installation complete!" -## install-bootstrap-docs: Incrementally sync AGENTS.md/SOUL.md/USER.md into workspace -install-bootstrap-docs: - @echo "Incrementally syncing bootstrap docs to $(WORKSPACE_DIR)..." - @mkdir -p $(WORKSPACE_DIR) - @for f in AGENTS.md SOUL.md USER.md; do \ - src="$(CURDIR)/$$f"; \ - dst="$(WORKSPACE_DIR)/$$f"; \ - if [ ! -f "$$src" ]; then \ - continue; \ - fi; \ - if [ ! -f "$$dst" ]; then \ - cp "$$src" "$$dst"; \ - echo " ✓ Added $$f"; \ - continue; \ - fi; \ - begin="# >>> CLAWGO MANAGED BLOCK: $$f >>>"; \ - end="# <<< CLAWGO MANAGED BLOCK: $$f <<<"; \ - tmp="$$(mktemp)"; \ - if grep -Fq "$$begin" "$$dst"; then \ - awk -v b="$$begin" -v e="$$end" -v src="$$src" '\ - BEGIN { in_block = 0 } \ - $$0 == b { \ - print; \ - while ((getline line < src) > 0) print line; \ - close(src); \ - in_block = 1; \ - next; \ - } \ - $$0 == e { in_block = 0; print; next } \ - !in_block { print } \ - ' "$$dst" > "$$tmp"; \ - else \ - cat "$$dst" > "$$tmp"; \ - printf "\n%s\n" "$$begin" >> "$$tmp"; \ - cat "$$src" >> "$$tmp"; \ - printf "\n%s\n" "$$end" >> "$$tmp"; \ - fi; \ - mv "$$tmp" "$$dst"; \ - echo " ✓ Updated $$f (incremental)"; \ - done - ## install-user: Install clawgo to ~/.local and copy builtin skills install-user: @$(MAKE) install INSTALL_PREFIX=$(USER_HOME)/.local -## install-skills: Install builtin skills to workspace -install-skills: - @echo "Installing builtin skills to $(WORKSPACE_SKILLS_DIR)..." - @mkdir -p $(WORKSPACE_SKILLS_DIR) - @for skill in $(BUILTIN_SKILLS_DIR)/*/; do \ - if [ -d "$$skill" ]; then \ - skill_name=$$(basename "$$skill"); \ - if [ -f "$$skill/SKILL.md" ]; then \ - mkdir -p $(WORKSPACE_SKILLS_DIR)/$$skill_name; \ - cp -r "$$skill" $(WORKSPACE_SKILLS_DIR); \ - echo " ✓ Installed skill: $$skill_name"; \ - fi; \ - fi; \ - done - @echo "Skills installation complete!" - ## uninstall: Remove clawgo from system uninstall: @echo "Uninstalling $(BINARY_NAME)..."