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
This commit is contained in:
parent
f693450455
commit
9c73a60f89
1 changed files with 2 additions and 2 deletions
4
Jenkinsfile
vendored
4
Jenkinsfile
vendored
|
|
@ -70,7 +70,7 @@ pipeline {
|
||||||
sh '''
|
sh '''
|
||||||
# Only process original source files, not already-processed ones
|
# Only process original source files, not already-processed ones
|
||||||
for file in *.lsl; do
|
for file in *.lsl; do
|
||||||
if [ -f "$file" ] && [[ ! "$file" =~ ^processed_ ]]; then
|
if [ -f "$file" ] && [ "${file#processed_}" = "$file" ]; then
|
||||||
echo "Processing $file..."
|
echo "Processing $file..."
|
||||||
python3 ${LSL_TOOLS_PATH}/lsl_preprocessor.py "$file" "processed_$file"
|
python3 ${LSL_TOOLS_PATH}/lsl_preprocessor.py "$file" "processed_$file"
|
||||||
fi
|
fi
|
||||||
|
|
@ -141,7 +141,7 @@ pipeline {
|
||||||
echo "" >> FUNCTIONS.md
|
echo "" >> FUNCTIONS.md
|
||||||
|
|
||||||
for file in *.lsl; do
|
for file in *.lsl; do
|
||||||
if [ -f "$file" ] && [[ ! "$file" =~ ^processed_ ]]; then
|
if [ -f "$file" ] && [ "${file#processed_}" = "$file" ]; then
|
||||||
echo "## $file" >> FUNCTIONS.md
|
echo "## $file" >> FUNCTIONS.md
|
||||||
echo "" >> FUNCTIONS.md
|
echo "" >> FUNCTIONS.md
|
||||||
grep -n "^[a-zA-Z_][a-zA-Z0-9_]*(" "$file" | head -20 >> FUNCTIONS.md || true
|
grep -n "^[a-zA-Z_][a-zA-Z0-9_]*(" "$file" | head -20 >> FUNCTIONS.md || true
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue