Skip to content
This repository has been archived by the owner on Nov 9, 2022. It is now read-only.

Commit

Permalink
#126 When doing "ml capture", check for existence of application/cust…
Browse files Browse the repository at this point in the history
…om. If it's already on the filesystem, don't overwrite it.
  • Loading branch information
dmcassel committed Aug 28, 2013
1 parent 590020e commit b31100e
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions deploy/lib/server_config.rb
Original file line number Diff line number Diff line change
Expand Up @@ -693,6 +693,13 @@ def capture
)
FileUtils.rm_rf("#{tmp_dir}/src/#{@properties['ml.group']}/")

# If we have an application/custom directory, we've probably done a capture
# before. Don't overwrite that directory. Kill the downloaded custom directory
# to avoid overwriting.
if Dir.exists? "#{@properties["ml.xquery.dir"]}/application/custom"
FileUtils.rm_rf("#{tmp_dir}/src/application/custom")
end

FileUtils.cp_r("#{tmp_dir}/src/.", @properties["ml.xquery.dir"])

FileUtils.rm_rf(tmp_dir)
Expand Down

0 comments on commit b31100e

Please sign in to comment.