Add quotes to unsafe if conditions in mapr element
In some cases unsafe if conditions can produce errors. Quotes should be used to avoid problems with empty variables Change-Id: Ia977bfa570ff9c3703a1a2dd370e1be0bf1b7a85 Closes-bug: #1463144
This commit is contained in:
parent
29572d5c90
commit
45b298a581
|
@ -20,7 +20,7 @@ fi
|
|||
|
||||
VERSION="$(curl -s --fail http://www.scala-lang.org|grep 'scala-version'|grep -Eo '([0-9]\.?)+')"
|
||||
|
||||
if [ $? != 0 -o -z ${VERSION} ]; then
|
||||
if [ $? != 0 -o -z "${VERSION}" ]; then
|
||||
echo "Installing default version $DEF_VERSION"
|
||||
VERSION=${DEF_VERSION}
|
||||
fi
|
||||
|
|
|
@ -37,9 +37,9 @@ else
|
|||
fi
|
||||
|
||||
echo "Downloading MapR repository archive"
|
||||
if [ -z ${DEB_REPO} -o -z ${RPM_REPO} ]; then
|
||||
if [ -z "${DEB_REPO}" -o -z "${RPM_REPO}" ]; then
|
||||
LATEST_ARCHIVE=$(curl -s ${MAPR_REPO_URL} | grep -Po '(?<=<a href=")(mapr-ecosystem.*?\.tgz)(?<!">)' | uniq | sort | tail -n 1)
|
||||
if [ -z ${LATEST_ARCHIVE} ]; then
|
||||
if [ -z "${LATEST_ARCHIVE}" ]; then
|
||||
echo "No repository archive found"
|
||||
exit 1
|
||||
fi
|
||||
|
|
Loading…
Reference in New Issue