portability awk add space between -v and it's argument, if anything has changed add ./COPYRIGHT
This commit is contained in:
@@ -22,8 +22,10 @@
|
||||
# current one is seen. Used by merge_copyrights.
|
||||
|
||||
thisyear=`date +%Y`
|
||||
git whatchanged --pretty="date %ai" --date=iso8601 | awk -vre="${thisyear}-" '
|
||||
git whatchanged --pretty="date %ai" --date=iso8601 | awk -v re="${thisyear}-" '
|
||||
BEGIN { change=0 }
|
||||
$1 == "date" && $2 !~ re { exit(0); }
|
||||
$1 == "date" { next; }
|
||||
NF == 0 { next; }
|
||||
$(NF-1) ~ /[AM]/ { print "./" $NF }' | sort | uniq
|
||||
$(NF-1) ~ /[AM]/ { print "./" $NF; change=1 }
|
||||
END { if (change) print "./COPYRIGHT" } ' | sort | uniq
|
||||
|
||||
Reference in New Issue
Block a user