shithub: rc

Download patch

ref: 5ce9505a184ba53d382d08e66382621d1d37f999
parent: 0af3c17ebc8fbbef503b47ec5e3c2cad55e93f8b
author: qwx <[email protected]>
date: Sun Sep 11 00:38:05 EDT 2022

bat: adapt to latest acpi(8) changes

--- a/bin/bat
+++ b/bin/bat
@@ -1,7 +1,10 @@
 #!/bin/rc
 rfork ne
-if(! test -f /mnt/pm/ctl)
-	aux/acpi || exit
+if(! test -f '#s'/acpi)
+	aux/acpi -s acpi || exit
+mount '#s'/acpi /mnt/pm || exit
+if(! test -f /mnt/pm/battery)
+	exit no battery to hand
 awk '
 {
 	print $1, $11, $12