Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

update.sh using sh instead of bash causing error #4208

Closed
solariz opened this issue Sep 3, 2024 · 0 comments
Closed

update.sh using sh instead of bash causing error #4208

solariz opened this issue Sep 3, 2024 · 0 comments

Comments

@solariz
Copy link

solariz commented Sep 3, 2024

Hey,

just want to point out that the tools/update.sh script is using the interpreter /bin/sh which was done for compatibility reasons I guess.

But on recent distros like deb 12 this throws a compatibility error because the double bracket compare is a enhanced bash feature not available in the compatible SH mode.

update.sh output with sh

-e Starting updating process: 2024-09-03_09:32:37
-e Make sure to create a backup of the application before you continue.
-e Application root: /var/www/html
./tools/update.sh: 102: [[: not found
-e Current branch: dist
-e You already have the latest version of the application, no upgrade needed.

Fix is simple to move the interpreter to #!/bin/bash and it runs smooth:

update.sh output with bash

Starting updating process: 2024-09-03_09:33:08
Make sure to create a backup of the application before you continue.
Application root: /var/www/html
Current branch: dist
You already have the latest version of the application, no upgrade needed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant