]> granicus.if.org Git - strace/commitdiff
copyright-year-gen: workaround for old git versions
authorEugene Syromyatnikov <evgsyr@gmail.com>
Sun, 27 Aug 2017 16:29:05 +0000 (18:29 +0200)
committerEugene Syromyatnikov <evgsyr@gmail.com>
Mon, 28 Aug 2017 00:31:33 +0000 (02:31 +0200)
Apply the same treatment to this script as the one in
v4.18-278-g295cf32.

* copyright-year-gen <year>: Change format to format:%cD, remove --date,
supply output as a -d option argument to date +%Y.

copyright-year-gen

index 5a2110e44b8fbba5ae3fd2768fb7672bcaeea49f..9d55acd672f56ff2a37d195f9b6b4c6414496180 100755 (executable)
@@ -13,7 +13,7 @@ year=
 [ -f "${YEAR_FILE}" ] && year="$(cat "${YEAR_FILE}")"
 
 [ -n "${year}" ] ||
-       year="$(git show --format=format:%cd --no-patch --date=format:%Y)"
+       year="$(date +%Y -d "$(git show --format=format:%cD --no-patch)")"
 
 [ -n "${year}" ] || year="${DEFAULT_YEAR}"