Louisvdw / dbus-serialbattery

Battery Monitor driver for serial battery in VenusOS GX systems
MIT License
492 stars 157 forks source link

Bug fix: for renaming venus-data.tar.gz in post-hook.sh #1083

Closed juswes closed 2 weeks ago

juswes commented 2 weeks ago

Bug fix: Renaming of the venus-data.tar.gz file to venus-data_installed.tar.gz in post-hook.sh was not working, because of wrong use of '$dir'

mr-manuel commented 2 weeks ago

Are you sure? It seems strange to me, that it does not work with absolute paths.

juswes commented 2 weeks ago

Yes, because the issue is that $dir already gives the absoluut path. So in the original code:

for dir in /media/*; do
    if [ -f "/media/$dir/venus-data.tar.gz" ]; then

Will be converted to: /media//media/mmcblk0p1/venus-data.tar.gz

mr-manuel commented 2 weeks ago

Found also another one. I pushed a commit in my repo, so it is available more faster. Thanks!

juswes commented 2 weeks ago

No problem, happy to help!