@@ -70,7 +70,7 @@ verify_entitlements() {
7070 local key_count
7171 key_count=" $(
7272 plutil -p " $entitlement_file " \
73- | rg -c ' ^\s +"[^"]+" =>'
73+ | grep -Ec ' ^[[:space:]] +"[^"]+" =>'
7474 ) "
7575 [[ " $key_count " == " 1" ]] \
7676 || release_fail " the app must contain exactly one entitlement."
@@ -89,10 +89,10 @@ verify_binary_policy() {
8989 signature_details=" $( codesign -d --verbose=4 " $app_bundle " 2>&1 ) "
9090
9191 print -r -- " $signature_details " \
92- | rg -q ' ^Identifier=com\.longdevity\.hardwarecontroller$' \
92+ | grep -Eq ' ^Identifier=com\.longdevity\.hardwarecontroller$' \
9393 || release_fail " the signed bundle identifier is unexpected."
9494 print -r -- " $signature_details " \
95- | rg -q ' ^CodeDirectory .*flags=.*\(runtime\)' \
95+ | grep -Eq ' ^CodeDirectory .*flags=.*\(runtime\)' \
9696 || release_fail " hardened runtime is not enabled."
9797 local team_identifier
9898 team_identifier=" $(
@@ -107,7 +107,7 @@ verify_binary_policy() {
107107 unexpected_libraries=" $(
108108 otool -L " $binary " \
109109 | awk ' NR > 1 {print $1}' \
110- | rg -v ' ^(/System/Library/|/usr/lib/)' \
110+ | grep -Ev ' ^(/System/Library/|/usr/lib/)' \
111111 || true
112112 ) "
113113 [[ -z " $unexpected_libraries " ]] \
@@ -274,11 +274,11 @@ main() {
274274 ) " == " $build_number " ]] \
275275 || release_fail " the app build number differs from packaging."
276276 file " $app_bundle /Contents/MacOS/HardwareController" \
277- | rg -q ' Mach-O 64-bit executable arm64' \
277+ | grep -Fq ' Mach-O 64-bit executable arm64' \
278278 || release_fail " the executable is not thin arm64."
279279 otool -l " $app_bundle /Contents/MacOS/HardwareController" \
280- | rg -A4 ' LC_BUILD_VERSION' \
281- | rg -q ' minos 15\.0' \
280+ | grep -A 4 ' LC_BUILD_VERSION' \
281+ | grep -Eq ' minos 15\.0' \
282282 || release_fail " the executable minimum is not macOS 15.0."
283283
284284 verify_disk_image_contents " $dmg_path " " $app_bundle "
0 commit comments