]> git.ipfire.org Git - thirdparty/bind9.git/commitdiff
portability awk add space between -v and it's argument, if anything has changed add...
authorMark Andrews <marka@isc.org>
Mon, 21 May 2012 05:11:34 +0000 (15:11 +1000)
committerMark Andrews <marka@isc.org>
Mon, 21 May 2012 05:19:21 +0000 (15:19 +1000)
util/recent_changes.sh

index 8462cc9b8c7ce52b68fa8aa656819e9d11139c10..729559557f7f2f70fa57f0420c0251b78e74c0ed 100644 (file)
 # 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