Changed str comparisons which mixed bash and posix
Executing "source import-stx" produces error message: "import-stx:175: = not found" Found that a few string comparisons in the file were using the bash exclusive string comparison operator '==' within the 'test' command, which is represented by the single brackets [1]. Basically, string comparisons in single brackets need to use '='. The proposed syntax is already used in other places in the code, so this is better for consistency as well. [1] https://www.man7.org/linux/man-pages/man1/test.1.html Test Plan: pass - source import-stx Change-Id: I4d6bbbaeb9431b6e640de228d123103dd74e0de5 Signed-off-by: Leonardo Fagundes Luz Serrano <Leonardo.FagundesLuzSerrano@windriver.com>
This commit is contained in:
parent
872cf170b7
commit
51d9f59d21
@ -172,7 +172,7 @@ if [ "$STX_PLATFORM" = "minikube" ]; then
|
||||
fi
|
||||
|
||||
FSTYPE=$(stat -f -L -c %T $MINIKUBE_HOME)
|
||||
if [ x"$FSTYPE" == x"nfs" ]; then
|
||||
if [ x"$FSTYPE" = x"nfs" ]; then
|
||||
echo ""
|
||||
echo "Warning: stx minikube doesn't allow \$MINIKUBE_HOME or \$HOME directory as nfs mount point!!!"
|
||||
echo " Please set non-nfs MINIKUBE_HOME with the command 'export MINIKUBE_HOME=XXX/YYY'"
|
||||
@ -189,7 +189,7 @@ if [ "$STX_PLATFORM" = "minikube" ]; then
|
||||
NUM_USERS=$(sqrt $(number_of_users))
|
||||
ABSOLUTE_MAX_CPUS=$(($(number_of_cpus)/$NUM_USERS))
|
||||
MAX_CPUS=$(number_of_cpus)
|
||||
if [ "$MAX_CPUS" == "" ] || [ "$MAX_CPUS" == "0" ]; then
|
||||
if [ "$MAX_CPUS" = "" ] || [ "$MAX_CPUS" = "0" ]; then
|
||||
MAX_CPUS=1
|
||||
fi
|
||||
|
||||
@ -205,7 +205,7 @@ if [ "$STX_PLATFORM" = "minikube" ]; then
|
||||
fi
|
||||
|
||||
MAX_MEMORY=`expr $(cat /proc/meminfo |grep MemTotal | awk '{print $2}') / 1024`
|
||||
if [ "$MAX_MEMORY" == "" ] || [ "$MAX_MEMORY" == "0" ]; then
|
||||
if [ "$MAX_MEMORY" = "" ] || [ "$MAX_MEMORY" = "0" ]; then
|
||||
MAX_MEMORY=2048
|
||||
fi
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user