env.sh: Fixed the wrong arguments input by set command. [1/1]
PD#SWPL-67525
Problem:
Fixed the wrong arguments input by set command.
Solution:
Fixed the wrong arguments input by set command.
Verify:
N/A
Change-Id: If47e43e43905ef01efade605f43204d325d60531
Signed-off-by: xiaohu.huang <xiaohu.huang@amlogic.com>
diff --git a/env.sh b/env.sh
index 98ef5b3..1031043 100755
--- a/env.sh
+++ b/env.sh
@@ -47,13 +47,12 @@
source scripts/gen_build_combination.sh
-if [ -n "$1" ]; then
- if [ $1 == "-h" ]; then
- usage
- exit 0
- else
- PROJECT="$1 $2 $3 $4"
- fi
+if [ -n "$1" ] && [ $1 == "-h" ]; then
+ usage
+ return 0
+elif [ $# -eq 4 ]; then
+ PROJECT="$1 $2 $3 $4"
+ echo "Choose project:$PROJECT"
else
unset ARRAY