tools/cpee in cpee-2.1.46 vs tools/cpee in cpee-2.1.47
- old
+ new
@@ -94,11 +94,11 @@
s = WEBrick::HTTPServer.new(:Port => 8080, :DocumentRoot => cockpit)
trap("INT"){ s.shutdown }
s.start
end
elsif command == 'cpui'
- if !File.exists?(p1)
+ if !File.exist?(p1)
FileUtils.cp_r(cockpit,p1)
else
FileUtils.cp_r(Dir.glob(File.join(cockpit,'*')).delete_if{|e| e =~ /\.json/ || e=~ /legacy/ },p1,remove_destination: true)
puts "Directory already exists, updating ..."
end
@@ -343,10 +343,10 @@
print "Working on: " + name.to_s + "\r"
Typhoeus.delete(File.join(base,name.to_s,'/'))
end
puts
elsif command == 'new'
- if !File.exists?(p1)
+ if !File.exist?(p1)
FileUtils.cp_r("#{curpath}/server/",p1)
FileUtils.mkdir("#{p1}/archive") rescue nil
FileUtils.mkdir("#{p1}/instances") rescue nil
FileUtils.mkdir("#{p1}/resources") rescue nil
FileUtils.mkdir("#{p1}/executionhandler") rescue nil