From: Ansgar Burchardt Date: Sat, 5 Sep 2015 11:30:24 +0000 (+0200) Subject: Automate updating README files X-Git-Url: https://git.decadent.org.uk/gitweb/?a=commitdiff_plain;h=1bcb905531e3a3e0f15617fb1cf45681df285e3e;p=dak.git Automate updating README files It would be better if the README files were generated from a template file, but this is better than nothing. --- 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 -- ./*~ ../*~ ../../*~