From 6670f5d63d351d7394890afb1d20665afe46d51f Mon Sep 17 00:00:00 2001 From: Eric Coissac Date: Mon, 30 Mar 2026 12:31:04 +0200 Subject: [PATCH] Filter only executable files in local tools copying Ensure that only executable files are copied from LOCAL_TOOLS_DIR to avoid copying non-executable or invalid files. Added check for executable permission (-x) alongside file existence (-f). --- install.sh | 2 +- update_crazyclaude.sh | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/install.sh b/install.sh index cca670f..b2ba03e 100755 --- a/install.sh +++ b/install.sh @@ -53,7 +53,7 @@ fi LOCAL_TOOLS_DIR="$CLAUDE_DIR/tools-local" if [[ -d "$LOCAL_TOOLS_DIR" ]]; then for src in "$LOCAL_TOOLS_DIR"/*; do - [[ -f "$src" ]] || continue + [[ -f "$src" && -x "$src" ]] || continue name="$(basename "$src")" cp "$src" "$CLAUDE_DIR/llm-functions/bin/$name" chmod +x "$CLAUDE_DIR/llm-functions/bin/$name" diff --git a/update_crazyclaude.sh b/update_crazyclaude.sh index 6558a67..501746d 100755 --- a/update_crazyclaude.sh +++ b/update_crazyclaude.sh @@ -68,7 +68,7 @@ LOCAL_TOOLS_DIR="$CLAUDE_DIR/tools-local" if [[ -d "$LOCAL_TOOLS_DIR" ]]; then count=0 for src in "$LOCAL_TOOLS_DIR"/*; do - [[ -f "$src" ]] || continue + [[ -f "$src" && -x "$src" ]] || continue name="$(basename "$src")" dest="$CLAUDE_DIR/llm-functions/bin/$name" cp "$src" "$dest"