setup.sh failed on ubuntu
Closed this issue · 3 comments
matlad commented
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
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
best thing i can thing of is using sed
example
echo "Installing missing dependencies: $(echo ${missing_dependencies}| sed 's/ /, /g')"
hipersayanX commented
Fixed in latest release.