tools/cpee in cpee-2.0.19 vs tools/cpee in cpee-2.0.20

- old
+ new

@@ -87,21 +87,21 @@ end end if command == 'ui' if js_libs(cockpit) - s = WEBrick::HTTPServer.new(:Port => 8080, :DocumentRoot => "#{curpath}/../cockpit/") + s = WEBrick::HTTPServer.new(:Port => 8080, :DocumentRoot => cockpit) trap("INT"){ s.shutdown } s.start end elsif command == 'cpui' - if js_libs(cockpit) if !File.exists?(p1) - FileUtils.cp_r("#{curpath}/../cockpit/",p1) + FileUtils.cp_r(cockpit,p1) else - puts "Directory already exists." + FileUtils.cp_r(Dir.glob(File.join(cockpit,'*')),p1,remove_destination: true) + puts "Directory already exists, updating ..." end - end + js_libs(p1) elsif command == 'convert' Dir['*.xml'].each do |f| XML::Smart.modify(f) do |doc| doc.register_namespace 'd', 'http://cpee.org/ns/description/1.0' doc.register_namespace 'p', 'http://riddl.org/ns/common-patterns/properties/1.0'