summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorgebele <gebele@in-silico.ch>2017-11-23 14:44:13 +0100
committergebele <gebele@in-silico.ch>2017-11-23 14:44:13 +0100
commite0d584e1664345671b099f16f9954933766595c4 (patch)
tree70471590f61da41701051f054a116214da141886
parent069588d825b568251b3969f20ed7c785bb035808 (diff)
rm only if dir exists
-rw-r--r--create_test_prediction_models.rb2
1 files changed, 1 insertions, 1 deletions
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"]}`