Skip to content

Commit

Permalink
Group resetprop common functions together
Browse files Browse the repository at this point in the history
  • Loading branch information
osm0sis authored Feb 7, 2025
1 parent 4dbe12a commit e2b8a3c
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions module/common_func.sh
Original file line number Diff line number Diff line change
Expand Up @@ -37,13 +37,6 @@ resetprop_hexpatch() {
| dd obs=1 count=93 seek=$((NAMEOFFSET-93)) conv=notrunc of="$PROPFILE"
}

# delprop_if_exist <prop name>
delprop_if_exist() {
local NAME="$1"

[ -n "$(resetprop "$NAME")" ] && resetprop --delete "$NAME"
}

# resetprop_if_diff <prop name> <expected value>
resetprop_if_diff() {
local NAME="$1"
Expand All @@ -62,5 +55,12 @@ resetprop_if_match() {
[[ "$(resetprop "$NAME")" = *"$CONTAINS"* ]] && $RESETPROP "$NAME" "$VALUE"
}

# delprop_if_exist <prop name>
delprop_if_exist() {
local NAME="$1"

[ -n "$(resetprop "$NAME")" ] && resetprop --delete "$NAME"
}

# stub for boot-time
ui_print() { return; }

0 comments on commit e2b8a3c

Please sign in to comment.