platform_system_sepolicy/tools/policy_version_check.sh
Inseob Kim 5d7423ff3d Build prebuilt policy with Soong
... and remove redundant Makefile codes. This also updates commit hook
as we now only use Soong to build sepolicy.

Bug: 296875906
Test: m selinux_policy
Change-Id: I93f0d222a0c10e31c51c9380780a8927c47d62b1
2023-09-07 16:32:30 +09:00

9 lines
312 B
Bash
Executable file

#!/bin/bash
MK=$(awk -F= '/PolicyVers/ { print $2 }' build/soong/policy.go | tr -d ' [:space:]')
BP=$(awk -F= '/DSEPOLICY_VERSION/ { print $2 }' Android.bp | awk -F\" ' { print $1 }')
if [ "$MK" != "$BP" ]; then
echo "POLICYVERS in Android.mk must match DSEPOLICY_VERSION in Android.bp" 1>&2
exit 1
fi