onnx / onnx-mlir

Representation and Reference Lowering of ONNX Models in MLIR Compiler Infrastructure
Apache License 2.0
754 stars 321 forks source link

Apache License in files #499

Closed AlexandreEichenberger closed 3 years ago

AlexandreEichenberger commented 3 years ago

ONNX has requested that they would prefer us to add the Apache license to each of the files:

ONNX/Readme.md listed as having an Apache 2.0 license and with this string:

  <!--- SPDX-License-Identifier: Apache-2.0 -->

and a h file with this string:

/*
 * SPDX-License-Identifier: Apache-2.0
 */

and a cmake file

# SPDX-License-Identifier: Apache-2.0

Any takers?

gongsu832 commented 3 years ago

These two commands should do it for all the .h and CMakeLists.txt files under src subdirectory:

for f in $(find src -name "*.h"); do sed -i -e '1s/^/\/*\n * SPDX-License-Identifier: Apache-2.0\n *\/\n\n/' $f; done
for f in $(find src -name CMakeLists.txt); do sed -i -e '1s/^/# SPDX-License-Identifier: Apache-2.0\n\n/' $f; done
AlexandreEichenberger commented 3 years ago

Love to see others using sed too... it can be addictive :-) Will do once travis is healthy again. Right now, it seems really flaky.

AlexandreEichenberger commented 3 years ago

done