aboutsummaryrefslogtreecommitdiff
path: root/scripts/functions
diff options
context:
space:
mode:
authorElliot Saba <staticfloat@gmail.com>2022-04-12 20:33:13 -0700
committerChris Packham <judge.packham@gmail.com>2022-04-22 10:15:04 +1200
commit7f84b9ab92f5bf3440eecc875e55b9a53127c9c5 (patch)
treed06331dfd058153949f01578dde533f29d6d6a6d /scripts/functions
parent429e6d8e883be0d99352eb08bde182da6518c71d (diff)
downloadcrosstool-ng-7f84b9ab92f5bf3440eecc875e55b9a53127c9c5.tar.gz
crosstool-ng-7f84b9ab92f5bf3440eecc875e55b9a53127c9c5.tar.bz2
crosstool-ng-7f84b9ab92f5bf3440eecc875e55b9a53127c9c5.zip
[scripts/functions]: Fix quoting issue in comparison
On my Ubuntu machine (with `dash` version `0.5.10` and `bash` version `5.0.17`), I would get errors such as the following: ``` crosstool-ng/scripts/functions: line 730: [: !=: unary operator expected ``` This is generally because a variable is not set, and expands to an empty string causing the test operator to mis-parse the expression. To fix this, I have added quotes around the variable. Signed-off-by: Elliot Saba <staticfloat@gmail.com>
Diffstat (limited to 'scripts/functions')
-rw-r--r--scripts/functions2
1 files changed, 1 insertions, 1 deletions
diff --git a/scripts/functions b/scripts/functions
index 24463428..5874c854 100644
--- a/scripts/functions
+++ b/scripts/functions
@@ -727,7 +727,7 @@ CT_DoGetFile()
rm -f "${tmp}"
# Replace a special value of '-1' with empty string
- if [ ${CT_CONNECT_TIMEOUT} != -1 ]; then
+ if [ "${CT_CONNECT_TIMEOUT}" != -1 ]; then
T="${CT_CONNECT_TIMEOUT}"
fi