whaleygeek / pyenergenie

A python interface to the Energenie line of products
MIT License
81 stars 51 forks source link

Enable Raspberry Pi build on platforms without bash #122

Closed BobSammers closed 3 years ago

BobSammers commented 4 years ago

I've recently dockerised the stuff that runs on my Pi, including this code. I was pleased to discover it works fine on the minimal Alpine docker image, but with one small exception: Alpine uses a different c lib (musl) to the standard Raspbian one (glibc) which the c code in the drv folder was presumably compiled with.

This is fine, because it can just be recompiled in Alpine against the correct library but Alpine is lacking a bash shell, which stops the build script running in the normal way without modification.

This change merely replaces the !# directive at the start of the script to start sh instead of bash, making it more widely compatible.

whaleygeek commented 3 years ago

Great, thanks @BobSammers - this is a small change so I will accept it. I usually use bash more out of habit, but this has no adverse affect so I will merge it.