diff options
author | Alejandro Colomar <alx@kernel.org> | 2022-10-09 18:02:16 +0200 |
---|---|---|
committer | Alejandro Colomar <alx@kernel.org> | 2022-10-09 18:02:16 +0200 |
commit | ab47278f252262dd9bd90f3386ffd7d8700fa25a (patch) | |
tree | d22eaf2c98911e7be9a58647d843cc20d298813f /scripts | |
parent | b23e48c976a3767de2250cdb164c1475c512d30d (diff) |
dist.mk, All pages: .TH: Generate date at 'make dist'
Replace the date by a placeholder (date) in the repo, as we're
doing with the version (unreleased). It will be filled when the
tarball is generated with 'make dist' (or equivalent) with the
date of the most recent git commit that modifies the page (as was
done previously by update_timestamps.sh, which has been removed).
Scripted change (mostly):
$ find man* -type f \
| xargs sed -Ei '/^\.TH /s/.TH +([^ ]+ +[^ ]+) +[^ ]+ +(.*)/.TH \1 (date) \2/'
Signed-off-by: Alejandro Colomar <alx@kernel.org>
Diffstat (limited to 'scripts')
-rwxr-xr-x | scripts/update_timestamps.sh | 19 |
1 files changed, 0 insertions, 19 deletions
diff --git a/scripts/update_timestamps.sh b/scripts/update_timestamps.sh deleted file mode 100755 index 9e1dc2ea4..000000000 --- a/scripts/update_timestamps.sh +++ /dev/null @@ -1,19 +0,0 @@ -#!/bin/sh -# -# (C) Copyright 2022, Alejandro Colomar -# SPDX-License-Identifier: GPL-3.0-only -# -# Update the timestamp of the manual pages modified since the last git -# tag, with the date of the latest commit that modifies that page. -# -####################################################################### - - -git diff --name-only $(git describe --abbrev=0)..HEAD \ -|xargs find 2>/dev/null \ -|while read f; do - date="$(git log --format=%ci -1 -- $f | cut -f1 -d' ')"; - - awk "/^\.TH/ {\$4 = \"$date\"} {print}" <$f \ - |sponge $f; -done; |