diff --git a/provision.sh b/provision.sh index deb26d1..34085dd 100644 --- a/provision.sh +++ b/provision.sh @@ -1,14 +1,14 @@ #!/usr/bin/env bash SETUP_DIR=$HOME/.pio -INSTALLED_FLAG=$SETUP_DIR/installed +INSTALL_SCRIPT_PATH='https://raw.githubusercontent.com/apache/incubator-predictionio/master/bin/install.sh' mkdir -p $SETUP_DIR -if [ ! -f $INSTALLED_FLAG ]; then +if [ ! -x "$(command -v pio-start-all)" ]; then echo "Installing PredictionIO..." - bash -e -c "$(curl -s https://install.prediction.io/install.sh)" 0 -y + bash -e -c "$(curl -sS $INSTALL_SCRIPT_PATH)" 0 -y if [ $? -ne 0 ]; then echo "ERROR: PredictionIO installation failed." @@ -23,7 +23,6 @@ if [ ! -f $INSTALLED_FLAG ]; then else echo "Finish PredictionIO installation." - touch $INSTALLED_FLAG fi