This is the mail archive of the
binutils@sourceware.org
mailing list for the binutils project.
Re: [PATCH] bfd/version.h: Add rationale for BFD_VERSION_DATE (Re: meaning of "Automatic date update in version.in" commits)
> > I assume that the bot is just replacing the line with
> > BFD_VERSION_DATE instead of regenerating the whole file from
> > scratch, but that's just guessing. (I don't have sourceware
> > shell access; I have no idea how the auto updater is implemented.)
>
> Back when I ran the cron job on my home machine, it did
> sed -e 's/20[0-9]*/'`date +%Y%m%d`/ < bfd/version.h > bfd/version.h.new
>
> I'm not sure what is done nowadays. You could always commit the patch
> and see what happens. :)
It should work no problem, as long as there is no date in the comment.
The script that we run nightly on sourceware.org (update-git-version)
does pretty much the same as what you were doing:
sed \
-e 's/[Y0-9][Y0-9][Y0-9][Y0-9]-[M0-9][M0-9]-[D0-9][D0-9]/'$date'/' \
-e 's/[Y0-9][Y0-9][Y0-9][Y0-9][M0-9][M0-9][D0-9][D0-9]/'$DATE'/' \
< ${file} > ${file}.new
--
Joel