From e0d584e1664345671b099f16f9954933766595c4 Mon Sep 17 00:00:00 2001 From: gebele Date: Thu, 23 Nov 2017 14:44:13 +0100 Subject: rm only if dir exists --- create_test_prediction_models.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/create_test_prediction_models.rb b/create_test_prediction_models.rb index 4fc2412..f41515c 100644 --- a/create_test_prediction_models.rb +++ b/create_test_prediction_models.rb @@ -93,7 +93,7 @@ end =end # remove existing local dump -`rm -r dump/#{ENV["LAZAR_ENV"]}` +`if [ -d dump/#{ENV["LAZAR_ENV"]} ]; then rm -Rf dump/#{ENV["LAZAR_ENV"]}; fi` # store local dump but git ignored `mongodump -h #{CENTRAL_MONGO_IP.blank? ? "127.0.0.1" : CENTRAL_MONGO_IP} -d #{ENV["LAZAR_ENV"]}` -- cgit v1.2.3