petterreinholdtsen / battery-stats

Log battery charge (battery-stats-collector), show gnuplot graphs (battery-graph)
GNU General Public License v2.0
27 stars 13 forks source link

fix shell expansion error when no batteries are connected #10

Closed nachtgeist closed 8 years ago

nachtgeist commented 8 years ago

fixes #9

jcromero commented 8 years ago

It does not work if BAT* is a symbolic link, like it is my case

nachtgeist commented 8 years ago

@jcromero: could you try this please: for bat in $(find . -maxdepth 1 -name "BAT*" -a \( -type d -o -type l \)); do

jcromero commented 8 years ago

@nachtgeist I submited a pull request with other solution: https://github.com/petterreinholdtsen/battery-stats/pull/13

Both fixes work right

nachtgeist commented 8 years ago

yours is nicer :) thanks