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).
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.