diff options
author | Jelle Raaijmakers <jelle@gmta.nl> | 2022-11-24 11:44:09 +0100 |
---|---|---|
committer | Linus Groh <mail@linusgroh.de> | 2022-11-24 12:06:25 +0000 |
commit | 45108438ce39101e8e9ff9230b5152f64d89326c (patch) | |
tree | a6da1f5eabbda2507eac8e695d5e0b56e4bb42c4 | |
parent | fef0330ee57d024a15821879f3ed6e9297b48d90 (diff) | |
download | serenity-45108438ce39101e8e9ff9230b5152f64d89326c.zip |
Ports: Fix warning when building with `useconfigure="false"`
When building a port with `useconfigure="false"`, the `do_configure`
function invokes a `buildstep` with multiple positional arguments as the
command to execute.
It then tests whether the positional arguments evaluate to an emtpy
string, but could fail when multiple positional arguments were provided.
This resulted in the following warning when building the Composer port,
for example:
../.port_include.sh: line 16: [: echo: binary operator expected
Prevent this warning by testing against the number of positional
arguments, instead.
-rwxr-xr-x | Ports/.port_include.sh | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/Ports/.port_include.sh b/Ports/.port_include.sh index bf9e58a009..0e14c0b8a7 100755 --- a/Ports/.port_include.sh +++ b/Ports/.port_include.sh @@ -13,7 +13,7 @@ export MAKEJOBS="${MAKEJOBS:-$(nproc)}" buildstep() { local buildstep_name=$1 shift - if [ -z "$@" ]; then + if [ "$#" -eq '0' ]; then "${buildstep_name}" else "$@" |