webcamoid / akvcam

akvcam, virtual camera for Linux
GNU General Public License v2.0
626 stars 87 forks source link

setup.sh failed on ubuntu #77

Closed matlad closed 10 months ago

matlad commented 1 year ago

when I install release using akvcam-installer-cli-linux-1.2.4.run I get error about bad substitution.

....
Public License instead of this License.
Please type y to accept, n otherwise: y
Creating directory /opt/akvcam
Verifying archive integrity...  100%   All good.
Uncompressing Install akvcam  100%  
akvcam installation started

Writting install data
Writting undo script
Writting uninstall script
./setup.sh: 417: Bad substitution

Script has shebang #!/bin/sh but use Shell Parameter Expansion which is not part of POSIX and is specific for bash. on Ubuntu default shell is dash so this fails

work around: force running by bash

bash setup.sh
hipersayanX commented 1 year ago

It's marking this line.

echo "Installing missing dependencies: ${missing_dependencies// /, }"

Is there a generic way of making string substitution or I must force bash in the shebang?

matlad commented 1 year ago

best thing i can thing of is using sed example

 echo "Installing missing dependencies: $(echo ${missing_dependencies}| sed 's/ /, /g')"
hipersayanX commented 10 months ago

Fixed in latest release.