From ce255302720ab5c53f0fcb04abbe2c4738ae251d Mon Sep 17 00:00:00 2001 From: Tom Smeding Date: Tue, 5 Feb 2019 13:51:30 +0100 Subject: Initial --- old/batwarn.sh | 26 +++++++++ old/syscalls_per_iteration.txt | 126 +++++++++++++++++++++++++++++++++++++++++ 2 files changed, 152 insertions(+) create mode 100755 old/batwarn.sh create mode 100644 old/syscalls_per_iteration.txt (limited to 'old') diff --git a/old/batwarn.sh b/old/batwarn.sh new file mode 100755 index 0000000..2556a70 --- /dev/null +++ b/old/batwarn.sh @@ -0,0 +1,26 @@ +#!/usr/bin/env bash +function get_props_key() { + local v="$(grep "$1" <<<"$props")" + echo "${v/*=}" +} + +function do_check() { + while read line; do + key="${line/=*}" + value="${line/*=}" + [[ $key = "POWER_SUPPLY_STATUS" ]] && status="$value" + [[ $key = "POWER_SUPPLY_CHARGE_NOW" ]] && charge="$value" + [[ $key = "POWER_SUPPLY_CHARGE_FULL_DESIGN" ]] && full="$value" + done