Update Jenkinsfile

This commit is contained in:
zontreck 2024-10-06 21:25:44 +00:00
parent 5908812d45
commit f8bdfeb03d

19
Jenkinsfile vendored
View file

@ -54,10 +54,21 @@ pipeline {
#!/bin/bash
cd patches
for i in *.patch; do
echo "Applying patch: $i"
patch -Np1 -i "$i" -d ../phoenix-firestorm/
done
# Enable nullglob so the pattern returns an empty list if no matches are found
shopt -s nullglob
patch_files=(*.patch)
# Only proceed if there are patch files
if [ ${#patch_files[@]} -ne 0 ]; then
# Loop over all patch files and apply them
for patch_file in "${patch_files[@]}"; do
echo "Applying $patch_file to ../phoenix-firestorm/"
patch -d ../phoenix-firestorm/ -Np1 -i "$patch_file"
done
echo "All patches applied."
else
echo "No patch files found."
fi
'''
}
}