You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
# copies of the Software, and to permit persons to whom the Software is
14
-
# furnished to do so, subject to the following conditions:
11
+
# http://www.apache.org/licenses/LICENSE-2.0
15
12
#
16
-
# The above copyright notice and this permission notice shall be included in all
17
-
# copies or substantial portions of the Software.
18
-
#
19
-
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
20
-
# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
21
-
# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
22
-
# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
23
-
# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
24
-
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
25
-
# SOFTWARE.
13
+
# Unless required by applicable law or agreed to in writing, software
14
+
# distributed under the License is distributed on an "AS IS" BASIS,
15
+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
16
+
# See the License for the specific language governing permissions and
17
+
# limitations under the License.
26
18
27
19
# Function used to check headers
28
20
# Arg1: Source file path
@@ -35,15 +27,15 @@ check_header() {
35
27
new_line=$3
36
28
last_line=$4
37
29
filename=$(echo $(basename ${source_file})| sed -r 's/\+/\\+/g')
38
-
pcregrep -Me "${first_line}${first_line:+\n}${new_line} @file ${filename}\n${new_line} @brief [[:print:]]*\n${new_line}\n${new_line} MIT License\n${new_line}\n${new_line} Copyright \(c\) 2022-2023 joelguittet and mender-mcu-client contributors\n${new_line}\n${new_line} Permission is hereby granted, free of charge, to any person obtaining a copy\n${new_line} of this software and associated documentation files \(the \"Software\"\), to deal\n${new_line} in the Software without restriction, including without limitation the rights\n${new_line} to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n${new_line} copies of the Software, and to permit persons to whom the Software is\n${new_line} furnished to do so, subject to the following conditions:\n${new_line}\n${new_line} The above copyright notice and this permission notice shall be included in all\n${new_line} copies or substantial portions of the Software.\n${new_line}\n${new_line} THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n${new_line} IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n${new_line} FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n${new_line} AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n${new_line} LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n${new_line} OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\n${new_line} SOFTWARE.${last_line:+\n}${last_line}\n" ${source_file} > /dev/null 2>&1
30
+
pcregrep -Me "${first_line}${first_line:+\n}${new_line} @file ${filename}\n${new_line} @brief [[:print:]]*\n${new_line}\n${new_line} Copyright joelguittet and mender-mcu-client contributors\n${new_line}\n${new_line} Licensed under the Apache License, Version 2.0 \(the \"License\"\);\n${new_line} you may not use this file except in compliance with the License.\n${new_line} You may obtain a copy of the License at\n${new_line}\n${new_line} http://www.apache.org/licenses/LICENSE-2.0\n${new_line}\n${new_line} Unless required by applicable law or agreed to in writing, software\n${new_line} distributed under the License is distributed on an \"AS IS\" BASIS,\n${new_line} WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n${new_line} See the License for the specific language governing permissions and\n${new_line} limitations under the License.${last_line:+\n}${last_line}\n"${source_file}> /dev/null 2>&1
39
31
return$?
40
32
}
41
33
42
34
# Initialize list of files that are not properly formatted
0 commit comments