Merge pull request #167 from cheah/fix-comparison

Fix value comparison in phh-prop-handler.sh
This commit is contained in:
Pierre-Hugues HUSSON 2020-03-26 16:50:44 +01:00 committed by GitHub
commit 9e60c42682
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -48,7 +48,7 @@ xiaomi_toggle_dt2w_event_node() {
}
if [ "$1" == "persist.sys.phh.xiaomi.dt2w" ]; then
if [[ "$prop_value" -ne 0 && "$prop_value" -ne 1 ]]; then
if [[ "$prop_value" != "0" && "$prop_value" != "1" ]]; then
exit 1
fi
@ -60,7 +60,7 @@ if [ "$1" == "persist.sys.phh.xiaomi.dt2w" ]; then
fi
if [ "$1" == "persist.sys.phh.oppo.dt2w" ]; then
if [[ "$prop_value" -ne 0 && "$prop_value" -ne 1 ]]; then
if [[ "$prop_value" != "0" && "$prop_value" != "1" ]]; then
exit 1
fi
@ -69,7 +69,7 @@ if [ "$1" == "persist.sys.phh.oppo.dt2w" ]; then
fi
if [ "$1" == "persist.sys.phh.oppo.gaming_mode" ]; then
if [[ "$prop_value" -ne 0 && "$prop_value" -ne 1 ]]; then
if [[ "$prop_value" != "0" && "$prop_value" != "1" ]]; then
exit 1
fi
@ -78,7 +78,7 @@ if [ "$1" == "persist.sys.phh.oppo.gaming_mode" ]; then
fi
if [ "$1" == "persist.sys.phh.oppo.usbotg" ]; then
if [[ "$prop_value" -ne 0 && "$prop_value" -ne 1 ]]; then
if [[ "$prop_value" != "0" && "$prop_value" != "1" ]]; then
exit 1
fi