summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPawit Pornkitprasan <p.pawit@gmail.com>2013-12-17 09:43:27 +0700
committerPawit Pornkitprasan <p.pawit@gmail.com>2013-12-17 09:48:20 +0700
commit719757d6a8670660c3c7d2490457ff7064241422 (patch)
tree0b8eb0af9d5e096ecfb2487a133dedd86015a2d1
parent53d6a7b8955e9377cc0a12206be357e7936621b1 (diff)
downloadgit-repo-719757d6a8670660c3c7d2490457ff7064241422.tar.gz
hooks/pre-auto-gc: fix AC detection on OSX Maverick
The output of pmset has been changed to "Now drawing from 'AC Power'" Change-Id: Id425d3bcd6a28656736a6d2c3096623a3ec053cc
-rwxr-xr-xhooks/pre-auto-gc2
1 files changed, 1 insertions, 1 deletions
diff --git a/hooks/pre-auto-gc b/hooks/pre-auto-gc
index 360e5e1f..43403022 100755
--- a/hooks/pre-auto-gc
+++ b/hooks/pre-auto-gc
@@ -35,7 +35,7 @@ elif grep -q "AC Power \+: 1" /proc/pmu/info 2>/dev/null
35then 35then
36 exit 0 36 exit 0
37elif test -x /usr/bin/pmset && /usr/bin/pmset -g batt | 37elif test -x /usr/bin/pmset && /usr/bin/pmset -g batt |
38 grep -q "Currently drawing from 'AC Power'" 38 grep -q "drawing from 'AC Power'"
39then 39then
40 exit 0 40 exit 0
41elif test -d /sys/bus/acpi/drivers/battery && test 0 = \ 41elif test -d /sys/bus/acpi/drivers/battery && test 0 = \