File tree Expand file tree Collapse file tree
.github/workflows/scripts Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -31,8 +31,13 @@ directory_to_scan="${1:-.}"
3131
3232for file in ${@ } ; do
3333 echo " Updating copyright notice in $file ..."
34- # For macOS, adding '' after -i to specify no backup file is created.
35- sed -i ' ' " s/Copyright (c) [0-9]\{4\} The Stdlib Authors./Copyright \(c\) $current_year The Stdlib Authors./g" " $file "
34+ if [[ " $OSTYPE " == " darwin" * ]]; then
35+ # macOS, where sed requires '' after -i to specify no backup...
36+ sed -i ' ' " s/Copyright (c) [0-9]\{4\} The Stdlib Authors./Copyright \(c\) $current_year The Stdlib Authors./g" " $file "
37+ else
38+ # Linux and others, no '' required...
39+ sed -i " s/Copyright (c) [0-9]\{4\} The Stdlib Authors./Copyright \(c\) $current_year The Stdlib Authors./g" " $file "
40+ fi
3641done
3742
3843echo " Copyright notices updated to $current_year ."
You can’t perform that action at this time.
0 commit comments