summaryrefslogtreecommitdiff
path: root/Ports/.port_include.sh
diff options
context:
space:
mode:
authorJelle Raaijmakers <jelle@gmta.nl>2022-11-24 11:44:09 +0100
committerLinus Groh <mail@linusgroh.de>2022-11-24 12:06:25 +0000
commit45108438ce39101e8e9ff9230b5152f64d89326c (patch)
treea6da1f5eabbda2507eac8e695d5e0b56e4bb42c4 /Ports/.port_include.sh
parentfef0330ee57d024a15821879f3ed6e9297b48d90 (diff)
downloadserenity-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.
Diffstat (limited to 'Ports/.port_include.sh')
-rwxr-xr-xPorts/.port_include.sh2
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
"$@"