Remove quotes from subshell call in install_scala.sh

Always no quotes for $() statement.

We don't need quotes to hold blanks in result:
 # i=$(echo 1 2 3)
 # echo $i
 1 2 3
 #

These quotes can make something wrong in some case:
 # i=$(echo '!')
 #
 # i="$(echo '!')"
 -bash: !: event not found
 #

 No real problem for current code in install_scala.sh, only to use a
 better code style.

Change-Id: Ia2370b8987ed121e5c44b3257cc7db42dd3390bb
Signed-off-by: Zhao Lei <zhaolei@cn.fujitsu.com>
This commit is contained in:
Zhao Lei 2015-08-07 21:23:43 +08:00
parent 427555e397
commit 6f728a44af

View File

@ -3,7 +3,7 @@
#Current available version
DEF_VERSION="2.11.5"
VERSION="$(wget -qO- http://www.scala-lang.org|grep 'scala-version'|grep -Eo '([0-9]\.?)+')"
VERSION=$(wget -qO- http://www.scala-lang.org|grep 'scala-version'|grep -Eo '([0-9]\.?)+')
if [ $? != 0 -o -z ${VERSION} ]; then
VERSION=${DEF_VERSION}