Last active
April 7, 2023 10:08
Revisions
-
raphael-brand revised this gist
Apr 7, 2023 . 1 changed file with 1 addition and 1 deletion.There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -8,6 +8,6 @@ CPRGHT_NOTICE='/* Copyright (c) 2023 Raphael Brand for file in $(git status --porcelain | grep -E '^(M|A)' | awk '{print $2}') do if ! (( $(grep -ir 'Copyright' $file | wc -l) >= 1 )); then echo "$CPRGHT_NOTICE$(cat $file)" > temp && mv temp $file fi done -
raphael-brand created this gist
Apr 6, 2023 .There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,13 @@ #!/bin/sh CPRGHT_NOTICE='/* Copyright (c) 2023 Raphael Brand License MIT */ ' for file in $(git status --porcelain | grep -E '^(M|A)' | awk '{print $2}') do if ! (( $(grep -ir 'Copyright' $file | wc -l) >= 1 )); then echo $CPRGHT_NOTICE | sed 's/\\//g'| echo "$CPRGHT_NOTICE$(cat $file)" > temp && mv temp $file fi done