diff options
author | Aki <please@ignore.pl> | 2023-12-27 01:15:39 +0100 |
---|---|---|
committer | Aki <please@ignore.pl> | 2023-12-27 01:15:39 +0100 |
commit | b5028afd6db466ac6ab8528a6f9a5fcd6d1fdb8a (patch) | |
tree | 196077369a14433aa4293beea30c9f34c31b623d /atom.xml.sh | |
parent | 995643cae1238ab3d3b21ae36ac666625d741afa (diff) | |
download | ignore.pl-b5028afd6db466ac6ab8528a6f9a5fcd6d1fdb8a.zip ignore.pl-b5028afd6db466ac6ab8528a6f9a5fcd6d1fdb8a.tar.gz ignore.pl-b5028afd6db466ac6ab8528a6f9a5fcd6d1fdb8a.tar.bz2 |
Source published date from git if not in the file itself
Diffstat (limited to 'atom.xml.sh')
-rwxr-xr-x | atom.xml.sh | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/atom.xml.sh b/atom.xml.sh index 157a924..ce74d94 100755 --- a/atom.xml.sh +++ b/atom.xml.sh @@ -11,6 +11,9 @@ meta () { dates () { local published=$(meta "published-on" "$1") + if [ -z "$published" ]; then + published=$(git rev-list --no-commit-header --pretty=%aI HEAD -- "$1" | tail -n1) + fi local modified=$(git rev-list --after="2023-12-27 00:45+01:00" -1 --no-commit-header --pretty=%aI HEAD -- "$1") [ -z "$modified" ] && modified=$(meta "last-modified-on" "$1") [ -z "$modified" ] && modified=$published |