summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authoru <u@billy>2023-04-09 10:46:06 -0400
committeru <u@billy>2023-04-09 10:46:06 -0400
commite0a8c461c7a8417a0de66a2b2a6579cccd02d1e3 (patch)
treecadba1e38c80323638557fc61b3d463f19b681e1
parent82f4d2368a90d8b271fdafc0a3ccc9dc078c4e7d (diff)
use bash builtin sleep
-rwxr-xr-xgo.sh11
1 files changed, 9 insertions, 2 deletions
diff --git a/go.sh b/go.sh
index d68c002..da662ec 100755
--- a/go.sh
+++ b/go.sh
@@ -1,5 +1,5 @@
1#!/bin/sh 1#!/bin/bash
2capacity_threshold=90 2capacity_threshold=50
3 3
4battery_dir=/sys/class/power_supply/BAT0 4battery_dir=/sys/class/power_supply/BAT0
5status_file=$battery_dir/status 5status_file=$battery_dir/status
@@ -43,6 +43,13 @@ go()
43 43
44main() 44main()
45{ 45{
46 if [ -e /usr/lib/bash/sleep ]
47 then
48 enable -f /usr/lib/bash/sleep sleep
49 else
50 echo 'Warning: not found: /usr/lib/bash/sleep (try: "sudo apt install bash-builtins")' >&2
51 fi
52
46 while true 53 while true
47 do 54 do
48 go 55 go