mirror of
https://github.com/chiteroman/PlayIntegrityFix.git
synced 2025-01-18 19:12:38 +02:00
18 lines
489 B
Bash
18 lines
489 B
Bash
# resetprop_if_diff <prop name> <expected value>
|
|
resetprop_if_diff() {
|
|
local NAME="$1"
|
|
local EXPECTED="$2"
|
|
local CURRENT="$(resetprop "$NAME")"
|
|
|
|
[ -z "$CURRENT" ] || [ "$CURRENT" = "$EXPECTED" ] || resetprop -n "$NAME" "$EXPECTED"
|
|
}
|
|
|
|
# resetprop_if_match <prop name> <value match string> <new value>
|
|
resetprop_if_match() {
|
|
local NAME="$1"
|
|
local CONTAINS="$2"
|
|
local VALUE="$3"
|
|
|
|
[[ "$(resetprop "$NAME")" = *"$CONTAINS"* ]] && resetprop -n "$NAME" "$VALUE"
|
|
}
|