fix(scripts/renew_copyright_header): Add support for gitignore files
This commit is contained in:
parent
4110f659c6
commit
9e7e9d7b12
|
@ -20,7 +20,7 @@
|
|||
# and the Lesser GNU General Public License along with this program.
|
||||
# If not, see <https://www.gnu.org/licenses/>.
|
||||
|
||||
TEMPLATE_LINE_LENGHT=20
|
||||
TEMPLATE_LINE_LENGHT=21
|
||||
remove() {
|
||||
extension="$1"
|
||||
file="$2"
|
||||
|
@ -31,7 +31,7 @@ remove() {
|
|||
# normal '#' comments (these are 19 lines long)
|
||||
# the `config` file is the cargo config at `./example/main/.cargo/config`, which is
|
||||
# toml
|
||||
"Makefile" | "toml" | "envrc" | "config" | "yml")
|
||||
"Makefile" | "toml" | "envrc" | "config" | "yml" | "gitignore")
|
||||
sed --in-place "1,${TEMPLATE_LINE_LENGHT}d" "$file"
|
||||
;;
|
||||
# normal '/* ... */' like comments (these are 21 lines long--'#' + 2)
|
||||
|
|
Reference in New Issue