Quellcode durchsuchen

Fix unterminated sed commands - replace with perl for better multi-line handling

TheWildJames vor 10 Monaten
Ursprung
Commit
bab2d80855
1 geänderte Dateien mit 3 neuen und 3 gelöschten Zeilen
  1. 3 3
      .github/workflows/build.yml

+ 3 - 3
.github/workflows/build.yml

@@ -459,11 +459,11 @@ jobs:
           elif [[ "${{ inputs.android_version }}" == "android13" && "${{ inputs.kernel_version }}" == "5.15" ]]; then
             sed -i 's/^\s*exit 1$/    echo "Who Cares? Bypassing Now!"/' build/kernel/abi/compare_to_symbol_list
           elif [[ "${{ inputs.android_version }}" == "android14" && "${{ inputs.kernel_version }}" == "5.15" ]]; then
-            sed -i '/if missing_symbols:/,/return 1/ s/return 1$/    print("Who Cares? Bypassing Now!")'$'\n''    return 0/' build/kernel/abi/check_buildtime_symbol_protection.py
+            perl -i -pe 's/return 1$/    print("Who Cares? Bypassing Now!")\n    return 0/g if /if missing_symbols:/../return 1/' build/kernel/abi/check_buildtime_symbol_protection.py
           elif [[ "${{ inputs.android_version }}" == "android14" && "${{ inputs.kernel_version }}" == "6.1" ]]; then
-            sed -i '/if missing_symbols:/,/return 1/ s/return 1$/    print("Who Cares? Bypassing Now!")'$'\n''    return 0/' build/kernel/abi/check_buildtime_symbol_protection.py
+            perl -i -pe 's/return 1$/    print("Who Cares? Bypassing Now!")\n    return 0/g if /if missing_symbols:/../return 1/' build/kernel/abi/check_buildtime_symbol_protection.py
           elif [[ "${{ inputs.android_version }}" == "android15" && "${{ inputs.kernel_version }}" == "6.6" ]]; then
-            sed -i '/if missing_symbols:/,/return 1/ s/return 1$/    print("Who Cares? Bypassing Now!")'$'\n''    return 0/' build/kernel/abi/check_buildtime_symbol_protection.py
+            perl -i -pe 's/return 1$/    print("Who Cares? Bypassing Now!")\n    return 0/g if /if missing_symbols:/../return 1/' build/kernel/abi/check_buildtime_symbol_protection.py
           fi
 
       - name: Configure Build Optimization