tshakalekholoane / bat

Battery management utility for Linux laptops.
https://tshaka.dev/x/bat
MIT License
291 stars 23 forks source link

feat: replace dependency on Bash with /bin/sh for cross-platform compatibility #68

Closed tshakalekholoane closed 1 year ago

tshakalekholoane commented 1 year ago

Is your feature request related to a problem? Please describe.

Currently, the project relies on the Bash shell for executing certain commands. While Bash is a powerful and versatile shell, it may not be available or the default shell on all systems. To ensure cross-platform compatibility and accessibility for a wider range of users, replacing Bash with the system's default POSIX-compliant shell, typically found at /bin/sh should be considered.

Describe the solution you'd like

Modify the systemd unit template to use the expanded battery variable path and hardcode the the shell path. See the following discussion for more details https://github.com/tshakalekholoane/bat/issues/65#issuecomment-1731128539.

Contributions

Contributions and suggestions on how to implement this change are welcome. If you have experience with shell scripting and cross-platform compatibility, please feel free to provide your insights and expertise.