From 8ae4d6fbb60157be4c9fd1b34f8663075ce6dc0b Mon Sep 17 00:00:00 2001 From: Hugo Duksis Date: Thu, 1 Jun 2017 14:24:49 +0200 Subject: [PATCH] Use the presence of pio-start-all comand as installed flag In order to avoid: ``` ==> PredictionIO: PredictionIO already installed. Skip installation. ==> PredictionIO: /tmp/vagrant-shell: line 34: pio-start-all: command not found ``` --- provision.sh | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/provision.sh b/provision.sh index deb26d1..8af02c1 100644 --- a/provision.sh +++ b/provision.sh @@ -1,11 +1,10 @@ #!/usr/bin/env bash SETUP_DIR=$HOME/.pio -INSTALLED_FLAG=$SETUP_DIR/installed 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 @@ -23,7 +22,6 @@ if [ ! -f $INSTALLED_FLAG ]; then else echo "Finish PredictionIO installation." - touch $INSTALLED_FLAG fi