From 1bcb905531e3a3e0f15617fb1cf45681df285e3e Mon Sep 17 00:00:00 2001 From: Ansgar Burchardt Date: Sat, 5 Sep 2015 13:30:24 +0200 Subject: [PATCH] Automate updating README files It would be better if the README files were generated from a template file, but this is better than nothing. --- docs/README.stable-point-release | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/docs/README.stable-point-release b/docs/README.stable-point-release index bfbe32e8..a280bec6 100644 --- a/docs/README.stable-point-release +++ b/docs/README.stable-point-release @@ -93,6 +93,16 @@ cd ${ftpdir} Clean up dists/stable/ChangeLog (add header, basically). bash: cd ${ftpdir}/dists/${suite} + +date_long=$(date "+%A, %-dth %B %Y" | sed 's/1th/1st/; s/2th/2nd/; s/3th/3rd/') +date_iso=$(date "+%Y-%m-%d") +date_short=$(date "+%a, %d %b %Y") +sed -e "1i======================================\n${date_short} - Debian ${newrev} released\n======================================" -i ChangeLog +sed -e "/^${suite}/ s/Debian ${oldrev}/Debian ${newrev}/" -i ../README +sed -e "s/Debian ${oldrev}/Debian ${newrev}/g; /Debian ${newrev}/ s/released .*\\./released ${date_long}./" -i ../../README +sed -e "s/Debian ${oldrev}/Debian ${newrev}/g; /Debian ${newrew}/ s/released .*\\./released ${date_long}./; /meta name=\"Modified\"/ s/content=\".*\"/content=\"${date_iso}\"/" -i ../../README.html + +# Inspect changes. Regular expressions might be a bit fragile. $EDITOR ChangeLog ../README ../../README ../../README.html rm -f -- ./*~ ../*~ ../../*~ -- 2.39.5