From fc8cd74cfc80c2dd386cefdfb82e79d3cabac5e9 Mon Sep 17 00:00:00 2001 From: NomenAK Date: Wed, 25 Jun 2025 19:10:37 +0200 Subject: [PATCH] fix: Correct file count reporting in install.sh verification MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - Fixed incorrect file count reporting where actual files (47) exceeded expected files (46) - Modified counting logic to exclude generated files (.checksums) from actual file count - Both expected and actual counts now use same baseline (source files only) - Ensures accurate installation verification and success reporting - Maintains all functionality including checksum generation and integrity verification 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude --- install.sh | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/install.sh b/install.sh index 1278da9..31723f2 100755 --- a/install.sh +++ b/install.sh @@ -979,7 +979,7 @@ while [[ $# -gt 0 ]]; do fi # Validate log file path - if [[ "$2" =~ $'\0'|[[:cntrl:]] ]]; then + if [[ "$2" =~ [[:cntrl:]] ]]; then log_error "Invalid characters in log file path: $2" exit 1 fi @@ -1753,7 +1753,12 @@ fi # Get expected files from source expected_files=$(get_source_files "." | wc -l) -actual_files=$(get_installed_files "$INSTALL_DIR" | wc -l) +# Count only the source files that were installed (exclude generated files like .checksums) +actual_files=$(get_source_files "." | while IFS= read -r file; do + if [[ -f "$INSTALL_DIR/$file" ]]; then + echo "$file" + fi +done | wc -l) # Count files by category for detailed report main_files=$(find "$INSTALL_DIR" -maxdepth 1 -name "*.md" -type f 2>/dev/null | wc -l)