GoXLR-on-Linux / goxlr-on-linux

Documentation and scripts to make the GoXLR and GoXLR Mini useful on Linux.
142 stars 8 forks source link

Install.sh contains bashism but the hash-bang is set to /bin/sh #33

Closed hungrymonkey closed 2 years ago

hungrymonkey commented 2 years ago

Describe the bug A clear and concise description of what the bug is.

The install.sh uses syntax incompatible with /bin/sh. Change the hash-bang to reflect the correct shell syntax.

http://mywiki.wooledge.org/Bashism

To Reproduce

  1. Run the install.sh on any distro without /bin/sh linked to a bashism compatible shell. Debian and Ubuntu uses dash. This bug is not reproducible on Fedora because their /bin/sh uses bash
  2. curl -L https://github.com/GoXLR-on-Linux/goxlr-on-linux/raw/main/install.sh | sudo sh
GoXLR Full or Mini? Options: full, mini: main: line 41: [: =: unary operator expected
main: line 41: [: =: unary operator expected
 isn't an option.
GoXLR Full or Mini? Options: full, mini: main: line 41: [: =: unary operator expected
main: line 41: [: =: unary operator expected
 isn't an option.
GoXLR Full or Mini? Options: full, mini: main: line 41: [: =: unary operator expected
main: line 41: [: =: unary operator expected
 isn't an option.
GoXLR Full or Mini? Options: full, mini: main: line 41: [: =: unary operator expected
main: line 41: [: =: unary operator expected
 isn't an option.
GoXLR Full or Mini? Options: full, mini: main: line 41: [: =: unary operator expected
main: line 41: [: =: unary operator expected
 isn't an option.
GoXLR Full or Mini? Options: full, mini: main: line 41: [: =: unary operator expected
main: line 41: [: =: unary operator expected
 isn't an option.
GoXLR Full or Mini? Options: full, mini: main: line 41: [: =: unary operator expected
main: line 41: [: =: unary operator expected
 isn't an option.
GoXLR Full or Mini? Options: full, mini: ^C

Expected behavior

Screenshots If applicable, add screenshots to help explain your problem.

Desktop (please complete the following information):

Additional context if [ $REPLY = '0' ]; then

http://mywiki.wooledge.org/Bashism

Easiest fix is to change #!/bin/sh into #!/bin/bash

I did not run the script and those errors are contributed by lm41

https://github.com/GoXLR-on-Linux/goxlr-on-linux/pull/30#commitcomment-60878272