Changeset b57ba05 in mainline for tools/transform-copyright.sh


Ignore:
Timestamp:
2022-08-13T11:46:44Z (2 years ago)
Author:
Jiří Zárevúcky <zarevucky.jiri@…>
Children:
c6f23a7
Parents:
cb7be8f
git-author:
Jiří Zárevúcky <zarevucky.jiri@…> (2022-08-13 11:43:59)
git-committer:
Jiří Zárevúcky <zarevucky.jiri@…> (2022-08-13 11:46:44)
Message:

Update headers in C++ files

File:
1 edited

Legend:

Unmodified
Added
Removed
  • tools/transform-copyright.sh

    rcb7be8f rb57ba05  
    11#!/bin/sh
    22
    3 # git grep -l --null "^# Copyright\b" -- '*.S' | xargs -r -L1 -0 tools/transform-copyright.sh
     3# git grep -l --null -F " * All rights reserved." -- '*.c' '*.h' '*.S' '*.cpp' '*.hpp' | xargs -L1 -0 tools/transform-copyright.sh
    44
    55FILENAME="$1"
    66
    7 grep -F '# Copyright' $FILENAME > $FILENAME.copyright__
    8 grep -v -F '# Copyright' $FILENAME > $FILENAME.nocopyright__
     7grep -F ' * Copyright' $FILENAME > $FILENAME.copyright__
     8grep -v -F ' * Copyright' $FILENAME > $FILENAME.nocopyright__
    99head -n 26 $FILENAME.nocopyright__ > $FILENAME.license__
    1010
     
    1212        tail -n +27 $FILENAME.nocopyright__ > $FILENAME.nolicense__
    1313        echo "/*" > $FILENAME
    14         sed 's/\# Copyright (c)/ * SPDX-FileCopyrightText:/g' $FILENAME.copyright__ >> $FILENAME
     14        sed 's/Copyright (c)/SPDX-FileCopyrightText:/g' $FILENAME.copyright__ >> $FILENAME
    1515        echo " *" >> $FILENAME
    1616        echo " * SPDX-License-Identifier: BSD-3-Clause" >> $FILENAME
Note: See TracChangeset for help on using the changeset viewer.