Skip to content

Commit

Permalink
Merge pull request #66 from openstudiocoalition/develop
Browse files Browse the repository at this point in the history
Update licenses
  • Loading branch information
macumber committed Oct 23, 2020
2 parents 3fbac35 + 9ec1249 commit 1147fed
Show file tree
Hide file tree
Showing 146 changed files with 286 additions and 149 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -24,4 +24,3 @@ EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT
USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

2 changes: 1 addition & 1 deletion LICENSE.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
OpenStudio(R), Copyright (c) 2008-2020, Alliance for Sustainable Energy, LLC, and other contributors. All rights reserved.
OpenStudio(R), Copyright (c) 2008-2020, OpenStudio Coalition and other contributors. All rights reserved.

Redistribution and use in source and binary forms, with or without modification, are permitted provided that the
following conditions are met:
Expand Down
141 changes: 141 additions & 0 deletions developer/ApplyCopyright.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,141 @@
# Inserts copyright at beginning of each
#
# Inputs:
# ARGV[0] - path to top level cmake source directory (one level above 'src' directory)

require 'pathname'
require 'rubygems'
require 'fileutils'

include FileUtils

# check that called from command line directly
if not ($0 == __FILE__)
puts "#{__FILE__} called from external script"
exit
end

basepath = ARGV[0].gsub("\\", "/")

copyright = "/***********************************************************************************************************************\n"
ruby_copyright = "########################################################################################################################\n"
File.open(basepath + "/LICENSE.md") do |file|
while (line = file.gets)
if line.strip.empty?
copyright += "*" + line
ruby_copyright += "#" + line

else
copyright += "* " + line
ruby_copyright += "# " + line
end
end
end
copyright += "***********************************************************************************************************************/\n\n"
ruby_copyright += "########################################################################################################################\n\n"

# first do c++

# exceptions are files that are not part of OpenStudio
exceptions = [basepath + "/developer"]

# glob for hpp and cpp
files = Dir.glob(basepath + "/src/**/*.[ch]pp")
files.concat Dir.glob(basepath + "/ruby/**/*.[ch]pp")
files.concat Dir.glob(basepath + "/src/**/*.cxx.in")
files.concat Dir.glob(basepath + "/src/**/*.tmp")

# reject exceptions
files.reject! do |p|
result = false
exceptions.each do |e|
if p.include?(e)
result = true
puts p
break
end
end
result
end

# loop over all files
files.each do |p|

# start with copyright
text = copyright

# read file
File.open(p, "r") do |file|
# read until end of current copyright
while (line = file.gets)
if not /^\s?[\/\*]/.match(line)
if not line.chomp.empty?
text += line
end
break
end
end

# now keep rest of file
while (line = file.gets)
text += line
end
end

# write file
File.open(p, "w") do |file|
file << text
end

end

# now do ruby

# exceptions are files that are not part of OpenStudio
exceptions = []

# glob for rb
files = Dir.glob(basepath + "/plugin/**/*.rb")

# reject exceptions
files.reject! do |p|
result = false
exceptions.each do |e|
if p.include?(e)
result = true
break
end
end
result
end

# loop over all files
files.each do |p|

# start with copyright
text = ruby_copyright

# read file
File.open(p, "r") do |file|
# read until end of current copyright
while (line = file.gets)
if not /^#/.match(line)
if not line.chomp.empty?
text += line
end
break
end
end

# now keep rest of file
while (line = file.gets)
text += line
end
end

# write file
File.open(p, "w") do |file|
file << text
end

end
2 changes: 1 addition & 1 deletion plugin/openstudio.rb
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
########################################################################################################################
# OpenStudio(R), Copyright (c) 2008-2020, Alliance for Sustainable Energy, LLC, and other contributors. All rights reserved.
# OpenStudio(R), Copyright (c) 2008-2020, OpenStudio Coalition and other contributors. All rights reserved.
#
# Redistribution and use in source and binary forms, with or without modification, are permitted provided that the
# following conditions are met:
Expand Down
2 changes: 1 addition & 1 deletion plugin/openstudio/lib/AnimationManager.rb
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
########################################################################################################################
# OpenStudio(R), Copyright (c) 2008-2020, Alliance for Sustainable Energy, LLC, and other contributors. All rights reserved.
# OpenStudio(R), Copyright (c) 2008-2020, OpenStudio Coalition and other contributors. All rights reserved.
#
# Redistribution and use in source and binary forms, with or without modification, are permitted provided that the
# following conditions are met:
Expand Down
2 changes: 1 addition & 1 deletion plugin/openstudio/lib/CommandManager.rb
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
########################################################################################################################
# OpenStudio(R), Copyright (c) 2008-2020, Alliance for Sustainable Energy, LLC, and other contributors. All rights reserved.
# OpenStudio(R), Copyright (c) 2008-2020, OpenStudio Coalition and other contributors. All rights reserved.
#
# Redistribution and use in source and binary forms, with or without modification, are permitted provided that the
# following conditions are met:
Expand Down
2 changes: 1 addition & 1 deletion plugin/openstudio/lib/ConflictManager.rb
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
########################################################################################################################
# OpenStudio(R), Copyright (c) 2008-2020, Alliance for Sustainable Energy, LLC, and other contributors. All rights reserved.
# OpenStudio(R), Copyright (c) 2008-2020, OpenStudio Coalition and other contributors. All rights reserved.
#
# Redistribution and use in source and binary forms, with or without modification, are permitted provided that the
# following conditions are met:
Expand Down
2 changes: 1 addition & 1 deletion plugin/openstudio/lib/DialogManager.rb
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
########################################################################################################################
# OpenStudio(R), Copyright (c) 2008-2020, Alliance for Sustainable Energy, LLC, and other contributors. All rights reserved.
# OpenStudio(R), Copyright (c) 2008-2020, OpenStudio Coalition and other contributors. All rights reserved.
#
# Redistribution and use in source and binary forms, with or without modification, are permitted provided that the
# following conditions are met:
Expand Down
2 changes: 1 addition & 1 deletion plugin/openstudio/lib/GbXMLImporter.rb
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
########################################################################################################################
# OpenStudio(R), Copyright (c) 2008-2020, Alliance for Sustainable Energy, LLC, and other contributors. All rights reserved.
# OpenStudio(R), Copyright (c) 2008-2020, OpenStudio Coalition and other contributors. All rights reserved.
#
# Redistribution and use in source and binary forms, with or without modification, are permitted provided that the
# following conditions are met:
Expand Down
2 changes: 1 addition & 1 deletion plugin/openstudio/lib/IdfImporter.rb
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
########################################################################################################################
# OpenStudio(R), Copyright (c) 2008-2020, Alliance for Sustainable Energy, LLC, and other contributors. All rights reserved.
# OpenStudio(R), Copyright (c) 2008-2020, OpenStudio Coalition and other contributors. All rights reserved.
#
# Redistribution and use in source and binary forms, with or without modification, are permitted provided that the
# following conditions are met:
Expand Down
2 changes: 1 addition & 1 deletion plugin/openstudio/lib/MenuManager.rb
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
########################################################################################################################
# OpenStudio(R), Copyright (c) 2008-2020, Alliance for Sustainable Energy, LLC, and other contributors. All rights reserved.
# OpenStudio(R), Copyright (c) 2008-2020, OpenStudio Coalition and other contributors. All rights reserved.
#
# Redistribution and use in source and binary forms, with or without modification, are permitted provided that the
# following conditions are met:
Expand Down
2 changes: 1 addition & 1 deletion plugin/openstudio/lib/ModelManager.rb
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
########################################################################################################################
# OpenStudio(R), Copyright (c) 2008-2020, Alliance for Sustainable Energy, LLC, and other contributors. All rights reserved.
# OpenStudio(R), Copyright (c) 2008-2020, OpenStudio Coalition and other contributors. All rights reserved.
#
# Redistribution and use in source and binary forms, with or without modification, are permitted provided that the
# following conditions are met:
Expand Down
2 changes: 1 addition & 1 deletion plugin/openstudio/lib/OpenStudioImporter.rb
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
########################################################################################################################
# OpenStudio(R), Copyright (c) 2008-2020, Alliance for Sustainable Energy, LLC, and other contributors. All rights reserved.
# OpenStudio(R), Copyright (c) 2008-2020, OpenStudio Coalition and other contributors. All rights reserved.
#
# Redistribution and use in source and binary forms, with or without modification, are permitted provided that the
# following conditions are met:
Expand Down
2 changes: 1 addition & 1 deletion plugin/openstudio/lib/PluginManager.rb
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
########################################################################################################################
# OpenStudio(R), Copyright (c) 2008-2020, Alliance for Sustainable Energy, LLC, and other contributors. All rights reserved.
# OpenStudio(R), Copyright (c) 2008-2020, OpenStudio Coalition and other contributors. All rights reserved.
#
# Redistribution and use in source and binary forms, with or without modification, are permitted provided that the
# following conditions are met:
Expand Down
2 changes: 1 addition & 1 deletion plugin/openstudio/lib/PluginUserScript.rb
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
########################################################################################################################
# OpenStudio(R), Copyright (c) 2008-2020, Alliance for Sustainable Energy, LLC, and other contributors. All rights reserved.
# OpenStudio(R), Copyright (c) 2008-2020, OpenStudio Coalition and other contributors. All rights reserved.
#
# Redistribution and use in source and binary forms, with or without modification, are permitted provided that the
# following conditions are met:
Expand Down
2 changes: 1 addition & 1 deletion plugin/openstudio/lib/PluginUserScriptRunner.rb
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
########################################################################################################################
# OpenStudio(R), Copyright (c) 2008-2020, Alliance for Sustainable Energy, LLC, and other contributors. All rights reserved.
# OpenStudio(R), Copyright (c) 2008-2020, OpenStudio Coalition and other contributors. All rights reserved.
#
# Redistribution and use in source and binary forms, with or without modification, are permitted provided that the
# following conditions are met:
Expand Down
2 changes: 1 addition & 1 deletion plugin/openstudio/lib/SddImporter.rb
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
########################################################################################################################
# OpenStudio(R), Copyright (c) 2008-2020, Alliance for Sustainable Energy, LLC, and other contributors. All rights reserved.
# OpenStudio(R), Copyright (c) 2008-2020, OpenStudio Coalition and other contributors. All rights reserved.
#
# Redistribution and use in source and binary forms, with or without modification, are permitted provided that the
# following conditions are met:
Expand Down
2 changes: 1 addition & 1 deletion plugin/openstudio/lib/SimulationManager.rb
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
########################################################################################################################
# OpenStudio(R), Copyright (c) 2008-2020, Alliance for Sustainable Energy, LLC, and other contributors. All rights reserved.
# OpenStudio(R), Copyright (c) 2008-2020, OpenStudio Coalition and other contributors. All rights reserved.
#
# Redistribution and use in source and binary forms, with or without modification, are permitted provided that the
# following conditions are met:
Expand Down
2 changes: 1 addition & 1 deletion plugin/openstudio/lib/UpdateManager.rb
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
########################################################################################################################
# OpenStudio(R), Copyright (c) 2008-2020, Alliance for Sustainable Energy, LLC, and other contributors. All rights reserved.
# OpenStudio(R), Copyright (c) 2008-2020, OpenStudio Coalition and other contributors. All rights reserved.
#
# Redistribution and use in source and binary forms, with or without modification, are permitted provided that the
# following conditions are met:
Expand Down
2 changes: 1 addition & 1 deletion plugin/openstudio/lib/WorkspaceObject.rb
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
########################################################################################################################
# OpenStudio(R), Copyright (c) 2008-2020, Alliance for Sustainable Energy, LLC, and other contributors. All rights reserved.
# OpenStudio(R), Copyright (c) 2008-2020, OpenStudio Coalition and other contributors. All rights reserved.
#
# Redistribution and use in source and binary forms, with or without modification, are permitted provided that the
# following conditions are met:
Expand Down
2 changes: 1 addition & 1 deletion plugin/openstudio/lib/dialogs/AboutDialog.rb
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
########################################################################################################################
# OpenStudio(R), Copyright (c) 2008-2020, Alliance for Sustainable Energy, LLC, and other contributors. All rights reserved.
# OpenStudio(R), Copyright (c) 2008-2020, OpenStudio Coalition and other contributors. All rights reserved.
#
# Redistribution and use in source and binary forms, with or without modification, are permitted provided that the
# following conditions are met:
Expand Down
2 changes: 1 addition & 1 deletion plugin/openstudio/lib/dialogs/AboutInterface.rb
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
########################################################################################################################
# OpenStudio(R), Copyright (c) 2008-2020, Alliance for Sustainable Energy, LLC, and other contributors. All rights reserved.
# OpenStudio(R), Copyright (c) 2008-2020, OpenStudio Coalition and other contributors. All rights reserved.
#
# Redistribution and use in source and binary forms, with or without modification, are permitted provided that the
# following conditions are met:
Expand Down
2 changes: 1 addition & 1 deletion plugin/openstudio/lib/dialogs/AnimationSettingsDialog.rb
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
########################################################################################################################
# OpenStudio(R), Copyright (c) 2008-2020, Alliance for Sustainable Energy, LLC, and other contributors. All rights reserved.
# OpenStudio(R), Copyright (c) 2008-2020, OpenStudio Coalition and other contributors. All rights reserved.
#
# Redistribution and use in source and binary forms, with or without modification, are permitted provided that the
# following conditions are met:
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
########################################################################################################################
# OpenStudio(R), Copyright (c) 2008-2020, Alliance for Sustainable Energy, LLC, and other contributors. All rights reserved.
# OpenStudio(R), Copyright (c) 2008-2020, OpenStudio Coalition and other contributors. All rights reserved.
#
# Redistribution and use in source and binary forms, with or without modification, are permitted provided that the
# following conditions are met:
Expand Down
2 changes: 1 addition & 1 deletion plugin/openstudio/lib/dialogs/ColorScaleDialog.rb
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
########################################################################################################################
# OpenStudio(R), Copyright (c) 2008-2020, Alliance for Sustainable Energy, LLC, and other contributors. All rights reserved.
# OpenStudio(R), Copyright (c) 2008-2020, OpenStudio Coalition and other contributors. All rights reserved.
#
# Redistribution and use in source and binary forms, with or without modification, are permitted provided that the
# following conditions are met:
Expand Down
2 changes: 1 addition & 1 deletion plugin/openstudio/lib/dialogs/ColorScaleInterface.rb
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
########################################################################################################################
# OpenStudio(R), Copyright (c) 2008-2020, Alliance for Sustainable Energy, LLC, and other contributors. All rights reserved.
# OpenStudio(R), Copyright (c) 2008-2020, OpenStudio Coalition and other contributors. All rights reserved.
#
# Redistribution and use in source and binary forms, with or without modification, are permitted provided that the
# following conditions are met:
Expand Down
2 changes: 1 addition & 1 deletion plugin/openstudio/lib/dialogs/DialogContainers.rb
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
########################################################################################################################
# OpenStudio(R), Copyright (c) 2008-2020, Alliance for Sustainable Energy, LLC, and other contributors. All rights reserved.
# OpenStudio(R), Copyright (c) 2008-2020, OpenStudio Coalition and other contributors. All rights reserved.
#
# Redistribution and use in source and binary forms, with or without modification, are permitted provided that the
# following conditions are met:
Expand Down
2 changes: 1 addition & 1 deletion plugin/openstudio/lib/dialogs/DialogInterface.rb
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
########################################################################################################################
# OpenStudio(R), Copyright (c) 2008-2020, Alliance for Sustainable Energy, LLC, and other contributors. All rights reserved.
# OpenStudio(R), Copyright (c) 2008-2020, OpenStudio Coalition and other contributors. All rights reserved.
#
# Redistribution and use in source and binary forms, with or without modification, are permitted provided that the
# following conditions are met:
Expand Down
2 changes: 1 addition & 1 deletion plugin/openstudio/lib/dialogs/Dialogs.rb
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
########################################################################################################################
# OpenStudio(R), Copyright (c) 2008-2020, Alliance for Sustainable Energy, LLC, and other contributors. All rights reserved.
# OpenStudio(R), Copyright (c) 2008-2020, OpenStudio Coalition and other contributors. All rights reserved.
#
# Redistribution and use in source and binary forms, with or without modification, are permitted provided that the
# following conditions are met:
Expand Down
2 changes: 1 addition & 1 deletion plugin/openstudio/lib/dialogs/LastReportDialog.rb
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
########################################################################################################################
# OpenStudio(R), Copyright (c) 2008-2020, Alliance for Sustainable Energy, LLC, and other contributors. All rights reserved.
# OpenStudio(R), Copyright (c) 2008-2020, OpenStudio Coalition and other contributors. All rights reserved.
#
# Redistribution and use in source and binary forms, with or without modification, are permitted provided that the
# following conditions are met:
Expand Down
2 changes: 1 addition & 1 deletion plugin/openstudio/lib/dialogs/LastReportInterface.rb
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
########################################################################################################################
# OpenStudio(R), Copyright (c) 2008-2020, Alliance for Sustainable Energy, LLC, and other contributors. All rights reserved.
# OpenStudio(R), Copyright (c) 2008-2020, OpenStudio Coalition and other contributors. All rights reserved.
#
# Redistribution and use in source and binary forms, with or without modification, are permitted provided that the
# following conditions are met:
Expand Down
2 changes: 1 addition & 1 deletion plugin/openstudio/lib/dialogs/LooseGeometryDialog.rb
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
########################################################################################################################
# OpenStudio(R), Copyright (c) 2008-2020, Alliance for Sustainable Energy, LLC, and other contributors. All rights reserved.
# OpenStudio(R), Copyright (c) 2008-2020, OpenStudio Coalition and other contributors. All rights reserved.
#
# Redistribution and use in source and binary forms, with or without modification, are permitted provided that the
# following conditions are met:
Expand Down
2 changes: 1 addition & 1 deletion plugin/openstudio/lib/dialogs/LooseGeometryInterface.rb
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
########################################################################################################################
# OpenStudio(R), Copyright (c) 2008-2020, Alliance for Sustainable Energy, LLC, and other contributors. All rights reserved.
# OpenStudio(R), Copyright (c) 2008-2020, OpenStudio Coalition and other contributors. All rights reserved.
#
# Redistribution and use in source and binary forms, with or without modification, are permitted provided that the
# following conditions are met:
Expand Down
2 changes: 1 addition & 1 deletion plugin/openstudio/lib/dialogs/PluginInspectorDialog.rb
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
########################################################################################################################
# OpenStudio(R), Copyright (c) 2008-2020, Alliance for Sustainable Energy, LLC, and other contributors. All rights reserved.
# OpenStudio(R), Copyright (c) 2008-2020, OpenStudio Coalition and other contributors. All rights reserved.
#
# Redistribution and use in source and binary forms, with or without modification, are permitted provided that the
# following conditions are met:
Expand Down
Loading

0 comments on commit 1147fed

Please sign in to comment.