Skip to content

Commit e3dae69

Browse files
committed
chore: make license more portable across *nix
1 parent cf6b0cf commit e3dae69

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

Makefile

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -81,11 +81,11 @@ release:
8181

8282
.PHONY: license
8383
license:
84-
@license_len=$$(wc -l $(LICENSE_FILE) | cut -f1 -d ' ') && \
84+
@license_len=$$(cat $(LICENSE_FILE) | wc -l) && \
8585
files=$$(git ls-files | grep -E "\.go|\.java") && \
8686
for file in $$files; do \
8787
echo "Applying license to $$file"; \
88-
head -n $$license_len $$file | diff -q $(LICENSE_FILE) - > /dev/null || \
88+
head -n $$license_len $$file | cmp -s $(LICENSE_FILE) - || \
8989
( ( cat $(LICENSE_FILE); echo; cat $$file ) > $$file.temp; mv $$file.temp $$file ) \
9090
done
9191

0 commit comments

Comments
 (0)