From 9c73a60f8904d9f3b1d592e137333e1e797a3a4f Mon Sep 17 00:00:00 2001 From: RebeccaNod1 Date: Thu, 14 Aug 2025 00:45:51 -0500 Subject: [PATCH] Fix Jenkins shell compatibility for POSIX sh - Replace bash [[ ]] with POSIX [ ] syntax - Use parameter expansion for prefix checking - Eliminates "[[: not found" errors in Jenkins logs - Maintains same functionality with better shell compatibility --- Jenkinsfile | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Jenkinsfile b/Jenkinsfile index 6967139..da300e1 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -70,7 +70,7 @@ pipeline { sh ''' # Only process original source files, not already-processed ones for file in *.lsl; do - if [ -f "$file" ] && [[ ! "$file" =~ ^processed_ ]]; then + if [ -f "$file" ] && [ "${file#processed_}" = "$file" ]; then echo "Processing $file..." python3 ${LSL_TOOLS_PATH}/lsl_preprocessor.py "$file" "processed_$file" fi @@ -141,7 +141,7 @@ pipeline { echo "" >> FUNCTIONS.md for file in *.lsl; do - if [ -f "$file" ] && [[ ! "$file" =~ ^processed_ ]]; then + if [ -f "$file" ] && [ "${file#processed_}" = "$file" ]; then echo "## $file" >> FUNCTIONS.md echo "" >> FUNCTIONS.md grep -n "^[a-zA-Z_][a-zA-Z0-9_]*(" "$file" | head -20 >> FUNCTIONS.md || true