Unverified Commit cbceb085 authored by Erik Wilson's avatar Erik Wilson Committed by GitHub

Merge pull request #1495 from joakimr-axis/joakimr-axis_comparison

Fix inconsistent shell script comparison operator ==
parents 9f8fc74e 36908f21
...@@ -4,12 +4,12 @@ set -ve ...@@ -4,12 +4,12 @@ set -ve
PROVISION="scripts/provision/$BOX/vagrant" PROVISION="scripts/provision/$BOX/vagrant"
if [ ! -f /etc/vagrant_box_build_time ]; then if [ ! -f /etc/vagrant_box_build_time ]; then
echo "This script should only be called during vagrant provisioning" echo 'This script should only be called during vagrant provisioning'
exit 1 exit 1
fi fi
if [[ $HOME == /go/* ]]; then if [[ $HOME = /go/* ]]; then
echo "Must not launch vagrant from /go/" echo 'Must not launch vagrant from /go/'
exit 1 exit 1
fi fi
cd cd
...@@ -31,9 +31,9 @@ fi ...@@ -31,9 +31,9 @@ fi
cat <<EOF >/etc/profile.d/env.sh cat <<EOF >/etc/profile.d/env.sh
export ARCH=amd64 export ARCH=amd64
export GO111MODULE=off export GO111MODULE=off
export GOPATH="$GOPATH" export GOPATH=$GOPATH
export PATH=/usr/local/bin:$PATH:/usr/local/go/bin:$GOPATH/bin export PATH=/usr/local/bin:$PATH:/usr/local/go/bin:$GOPATH/bin
export HOME="$HOME" && cd export HOME=$HOME && cd
EOF EOF
. /etc/profile.d/env.sh . /etc/profile.d/env.sh
...@@ -72,7 +72,7 @@ EOF ...@@ -72,7 +72,7 @@ EOF
download_go() { download_go() {
goversion=$(grep "^FROM " Dockerfile.dapper | sed -e 's/^FROM golang:\(.*\)-.*/\1/') goversion=$(grep "^FROM " Dockerfile.dapper | sed -e 's/^FROM golang:\(.*\)-.*/\1/')
if [ -z "$goversion" ]; then if [ -z "$goversion" ]; then
echo "Cannot find version of go to fetch" echo 'Cannot find version of go to fetch'
return 1 return 1
fi fi
echo "Installing go $goversion" echo "Installing go $goversion"
...@@ -83,7 +83,7 @@ download_go() { ...@@ -83,7 +83,7 @@ download_go() {
download_dqlite() { download_dqlite() {
dqliteURL="https://github.com/$(grep dqlite-build Dockerfile.dapper | sed -e 's/^.*--from=\([^ ]*\).*$/\1/' -e 's|:|/releases/download/|')/dqlite-$ARCH.tgz" dqliteURL="https://github.com/$(grep dqlite-build Dockerfile.dapper | sed -e 's/^.*--from=\([^ ]*\).*$/\1/' -e 's|:|/releases/download/|')/dqlite-$ARCH.tgz"
if [ -z "$dqliteURL" ]; then if [ -z "$dqliteURL" ]; then
echo "Cannot find dqlite URL to fetch" echo 'Cannot find dqlite URL to fetch'
return 1 return 1
fi fi
mkdir -p /usr/src/ mkdir -p /usr/src/
...@@ -93,7 +93,7 @@ download_dqlite() { ...@@ -93,7 +93,7 @@ download_dqlite() {
# --- Run vagrant provision script if available # --- Run vagrant provision script if available
if [ ! -f "${PROVISION}" ]; then if [ ! -f "${PROVISION}" ]; then
echo 'WARNING: Unable to execute provision script "${PROVISION}"' echo "WARNING: Unable to execute provision script \"${PROVISION}\""
exit exit
fi fi
echo "running '${PROVISION}'..." && \ echo "running '${PROVISION}'..." && \
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment