Compare commits
2 Commits
57b5484780
...
01a4b942f8
Author | SHA1 | Date | |
---|---|---|---|
01a4b942f8 | |||
25e6960709 |
@ -3,10 +3,17 @@
|
||||
# Makes all access/modified file dates in the whole repository match with the file's last git commit date
|
||||
# This is important because Make is based on file timestamps, not git commits
|
||||
|
||||
total=$(git ls-files $(git rev-parse --show-toplevel) | wc -l)
|
||||
total=$(git ls-files "$(git rev-parse --show-toplevel)" | wc -l)
|
||||
i=1
|
||||
for f in $(git ls-files $(git rev-parse --show-toplevel)); do
|
||||
for f in $(git ls-files "$(git rev-parse --show-toplevel)"); do
|
||||
echo "[${i}/${total}] $f"
|
||||
touch -a -m --date="@$(git log --pretty="%ct" -1 "$f")" "$f"
|
||||
# TODO the line directly below this is because after moving main website to fsfe.org dir the translation status
|
||||
# stuff based on dates became a bit useless.
|
||||
# So we use the second to last commit date for every file.
|
||||
# after 6 months or so (february 2025) remove the line below with --follow in it, and uncomment the touch underneath it
|
||||
# TLDR: If after February 2025 remove line directly below this, containign follow and uncomment the touch line below that,
|
||||
# without a follow. Please also remove this comment then
|
||||
touch -a -m --date="@$(git log --pretty="%ct" --follow -2 "$f"| tail -n1)" "$f"
|
||||
# touch -a -m --date="@$(git log --pretty="%ct" -1 "$f")" "$f"
|
||||
((i++))
|
||||
done
|
||||
|
@ -92,7 +92,14 @@ statuses="$(
|
||||
translation_version="-1"
|
||||
fi
|
||||
if [ "${translation_version:-0}" -lt "${original_version:-0}" ]; then
|
||||
originaldate=$(git log --pretty="%cd" --date=raw -1 "$base".en."$ext" | cut -d' ' -f1)
|
||||
# TODO the line directly below this is because after moving main website to fsfe.org dir the translation status
|
||||
# stuff based on dates became a bit useless.
|
||||
# So we use the second to last commit date for every file.
|
||||
# after 6 months or so (february 2025) remove the line below with --follow in it, and uncomment the touch underneath it
|
||||
# TLDR: If after February 2025 remove line directly below this, containign follow and uncomment the touch line below that,
|
||||
# without a follow. Please also remove this comment then
|
||||
originaldate=$(git log --follow --pretty="%ct" -2 "$base".en."$ext" | tail -n1)
|
||||
# originaldate=$(git log --pretty="%ct" -1 "$base".en."$ext")
|
||||
if [ "$ext" == "xhtml" ]; then
|
||||
original_url="https://webpreview.fsfe.org?uri=${base/#\.\/fsfe.org/}.en.html"
|
||||
translation_url="https://webpreview.fsfe.org?uri=${base/#\.\/fsfe.org/}.$lang_short.html"
|
||||
|
Loading…
x
Reference in New Issue
Block a user