From: Eugene Syromyatnikov Date: Sun, 27 Aug 2017 16:29:05 +0000 (+0200) Subject: copyright-year-gen: workaround for old git versions X-Git-Tag: v4.19~53 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=f07e8ada33c485b618fd6b64f7354579d3c9945a;p=strace copyright-year-gen: workaround for old git versions Apply the same treatment to this script as the one in v4.18-278-g295cf32. * copyright-year-gen : Change format to format:%cD, remove --date, supply output as a -d option argument to date +%Y. --- diff --git a/copyright-year-gen b/copyright-year-gen index 5a2110e4..9d55acd6 100755 --- a/copyright-year-gen +++ b/copyright-year-gen @@ -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}"