Changeset b57ba05 in mainline for tools/transform-copyright.sh
- Timestamp:
- 2022-08-13T11:46:44Z (2 years ago)
- 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)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
tools/transform-copyright.sh
rcb7be8f rb57ba05 1 1 #!/bin/sh 2 2 3 # git grep -l --null "^# Copyright\b" -- '*.S' | xargs -r-L1 -0 tools/transform-copyright.sh3 # git grep -l --null -F " * All rights reserved." -- '*.c' '*.h' '*.S' '*.cpp' '*.hpp' | xargs -L1 -0 tools/transform-copyright.sh 4 4 5 5 FILENAME="$1" 6 6 7 grep -F ' #Copyright' $FILENAME > $FILENAME.copyright__8 grep -v -F ' #Copyright' $FILENAME > $FILENAME.nocopyright__7 grep -F ' * Copyright' $FILENAME > $FILENAME.copyright__ 8 grep -v -F ' * Copyright' $FILENAME > $FILENAME.nocopyright__ 9 9 head -n 26 $FILENAME.nocopyright__ > $FILENAME.license__ 10 10 … … 12 12 tail -n +27 $FILENAME.nocopyright__ > $FILENAME.nolicense__ 13 13 echo "/*" > $FILENAME 14 sed 's/ \# Copyright (c)/ *SPDX-FileCopyrightText:/g' $FILENAME.copyright__ >> $FILENAME14 sed 's/Copyright (c)/SPDX-FileCopyrightText:/g' $FILENAME.copyright__ >> $FILENAME 15 15 echo " *" >> $FILENAME 16 16 echo " * SPDX-License-Identifier: BSD-3-Clause" >> $FILENAME
Note:
See TracChangeset
for help on using the changeset viewer.