Update patch.sh

This commit is contained in:
FiorenMas
2023-04-11 13:16:13 +07:00
committed by GitHub
parent 34a06acdd9
commit 8a1a13a2ee

View File

@@ -16,7 +16,7 @@ get_patch() {
local included_start=$(grep -n -m1 'INCLUDE PATCHES' "$patch_file" | cut -d':' -f1) local included_start=$(grep -n -m1 'INCLUDE PATCHES' "$patch_file" | cut -d':' -f1)
local excluded_patches=$(tail -n +$excluded_start $patch_file | head -n "$(( included_start - excluded_start ))" | grep '^[^#[:blank:]]') local excluded_patches=$(tail -n +$excluded_start $patch_file | head -n "$(( included_start - excluded_start ))" | grep '^[^#[:blank:]]')
local included_patches=$(tail -n +$included_start $patch_file | grep '^[^#[:blank:]]') local included_patches=$(tail -n +$included_start $patch_file | grep '^[^#[:blank:]]')
local patches=() patches=()
if [[ -n "$excluded_patches" ]]; then if [[ -n "$excluded_patches" ]]; then
while read -r patch; do while read -r patch; do
patches+=("-e $patch") patches+=("-e $patch")