Closed moll closed 2 years ago
Hey,
I noticed the shebang in https://github.com/open-eid/linux-installer/blob/master/install-open-eid.sh refers to #!/bin/bash, yet the official guide video on https://www.id.ee/artikkel/paigalda-id-tarkvara/ (https://www.youtube.com/watch?v=2zQshBBVtcc) instructs calling sh, which since 2006(?) has been Dash on Ubuntu (https://wiki.ubuntu.com/DashAsBinSh). The script works fine with Dash and probably other POSIX-compatible shells and should probably refer to /bin/sh directly, making sure shellcheck and other linters can catch any future bashisms.
#!/bin/bash
sh
shellcheck
Regarding this, I think the -e argument to echo could/should also be removed and/or replaced to use printf. I'm not sure about echo arguments' POSIX-compatiblity, but a fresh install on Ubuntu 20.04 today sure prints -e out, as can be confirmed:
-e
echo
printf
$ sh -c 'echo -e test' -e test
Cheers
Hey,
I noticed the shebang in https://github.com/open-eid/linux-installer/blob/master/install-open-eid.sh refers to
#!/bin/bash
, yet the official guide video on https://www.id.ee/artikkel/paigalda-id-tarkvara/ (https://www.youtube.com/watch?v=2zQshBBVtcc) instructs callingsh
, which since 2006(?) has been Dash on Ubuntu (https://wiki.ubuntu.com/DashAsBinSh). The script works fine with Dash and probably other POSIX-compatible shells and should probably refer to /bin/sh directly, making sureshellcheck
and other linters can catch any future bashisms.Regarding this, I think the
-e
argument toecho
could/should also be removed and/or replaced to useprintf
. I'm not sure aboutecho
arguments' POSIX-compatiblity, but a fresh install on Ubuntu 20.04 today sure prints-e
out, as can be confirmed:Cheers