Browse Source

Merge branch 'CR_1605_build_script' of 192.168.110.45:sdk/freelight-u-sdk into CR_1605_build_script

Jason Zhou 1 year ago
parent
commit
85d9b01f9b
1 changed files with 13 additions and 12 deletions
  1. 13 12
      build.sh

+ 13 - 12
build.sh

@@ -22,7 +22,7 @@ echo $0 $1
 #default
 cpu_numb_input="1"
 
-#interactive input cpu number
+#real cpu number
 num=`cat /proc/cpuinfo | grep "processor" | wc -l`
 
 if [ $1 ]
@@ -34,17 +34,18 @@ else
 
 	printf "please input the cpu number to perform concurrent build, choose 1 ~ $num:\n"
 	read cpu_numb_input
-	if (( $cpu_numb_input > $num ))
-	then
-		echo "input > $num  error, exit"
-		exit 1
-	fi
-
-	if (( $cpu_numb_input  <  1 ))
-	then
-		echo "input < 1 error, exit"
-		exit 1
-	fi
+
+fi
+
+if (( $cpu_numb_input > $num ))
+then
+	echo "input > $num  error, exit"
+	exit 1
+fi
+if (( $cpu_numb_input  <  1 ))
+then
+	echo "input < 1 error, exit"
+	exit 1
 fi
 
 printf ${COLOR_NORMAL}