LacunaSpace / basicmac

BasicMAC LoRaWAN stack that supports (but is not limited to) Arduino
Other
75 stars 18 forks source link

arduino: Fix export script when path contains whitespace #22

Closed matthijskooijman closed 3 years ago

matthijskooijman commented 3 years ago

Because of the way the local keyword works in shells and missing quotes, when using --link and having a space in either the clone directory or export target directory, the script would error out.

But it also turns out that POSIX sh does not actually specify the local keyword. Even though most implementations seem to support it, using local variables is not quite essential here, so better improve compatibility and use global variables instead (which, due to the way a normal assignment interacts with word-splitting, does not suffer from the same problem even without quotes).

This fixes #21.

matthijskooijman commented 3 years ago

Rebased, merging now.