On Thu, Sep 6, 2018 at 10:48 AM Samuraiii <samurai.no.d...@gmail.com> wrote:
>
> On 5.9.2018 21:20, Mick wrote:
>
> Hi All,
>
> I just noticed a psd error at boot time:
>
> /usr/bin/profile-sync-daemon: line 325: ${#DIRArr[@]##*/}: bad substitution
>
> Any idea what's brought this about?
>
> Hi,
>
> my bet is that your /bin/sh != /bin/bash and /usr/bin/profile-sync-daemon 
> starts with #!/bin/sh.
>
> The other way around /usr/bin/profile-sync-daemon contains bashishms.
>
> You can try (as a test) to change #!/bin/sh for #!/bin/bash...
>
> S

The shebang in the master repository is '#!/bin/bash'.
https://raw.githubusercontent.com/graysky2/profile-sync-daemon/master/common/profile-sync-daemon.in

The error message is a shell parameter expansion syntax error, which
comprises two different expansion constructs referenced below.
${#parameter}
String Length.

${parameter##[word]}
Remove Largest Prefix Pattern.

See section 2.6.2 Parameter Expansion,
http://pubs.opengroup.org/onlinepubs/9699919799/nframe.html.

The script in the master repository referenced above does not contain
the line in question. It has '${#DIRArr[@]/}' and '${DIRArr[@]##*/}'.

Reply via email to