Compare commits

..

No commits in common. "01a4b942f8ac41c460f06f7e3be8160d6008aaa3" and "57b54847807daf450f22500c8bb2bab0441553fc" have entirely different histories.

2 changed files with 4 additions and 18 deletions

View File

@ -3,17 +3,10 @@
# 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"
# 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"
touch -a -m --date="@$(git log --pretty="%ct" -1 "$f")" "$f"
((i++))
done

View File

@ -92,14 +92,7 @@ statuses="$(
translation_version="-1"
fi
if [ "${translation_version:-0}" -lt "${original_version:-0}" ]; then
# 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")
originaldate=$(git log --pretty="%cd" --date=raw -1 "$base".en."$ext" | cut -d' ' -f1)
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"