1 |
On Thu, Sep 6, 2018 at 10:48 AM Samuraiii <samurai.no.dojo@×××××.com> wrote: |
2 |
> |
3 |
> On 5.9.2018 21:20, Mick wrote: |
4 |
> |
5 |
> Hi All, |
6 |
> |
7 |
> I just noticed a psd error at boot time: |
8 |
> |
9 |
> /usr/bin/profile-sync-daemon: line 325: ${#DIRArr[@]##*/}: bad substitution |
10 |
> |
11 |
> Any idea what's brought this about? |
12 |
> |
13 |
> Hi, |
14 |
> |
15 |
> my bet is that your /bin/sh != /bin/bash and /usr/bin/profile-sync-daemon starts with #!/bin/sh. |
16 |
> |
17 |
> The other way around /usr/bin/profile-sync-daemon contains bashishms. |
18 |
> |
19 |
> You can try (as a test) to change #!/bin/sh for #!/bin/bash... |
20 |
> |
21 |
> S |
22 |
|
23 |
The shebang in the master repository is '#!/bin/bash'. |
24 |
https://raw.githubusercontent.com/graysky2/profile-sync-daemon/master/common/profile-sync-daemon.in |
25 |
|
26 |
The error message is a shell parameter expansion syntax error, which |
27 |
comprises two different expansion constructs referenced below. |
28 |
${#parameter} |
29 |
String Length. |
30 |
|
31 |
${parameter##[word]} |
32 |
Remove Largest Prefix Pattern. |
33 |
|
34 |
See section 2.6.2 Parameter Expansion, |
35 |
http://pubs.opengroup.org/onlinepubs/9699919799/nframe.html. |
36 |
|
37 |
The script in the master repository referenced above does not contain |
38 |
the line in question. It has '${#DIRArr[@]/}' and '${DIRArr[@]##*/}'. |