[FFmpeg-devel] [PATCH] web: Copy FFmpeg Logo by Makefile instead of cronjob
Michael Niedermayer
michaelni at gmx.at
Thu Apr 5 19:56:21 CEST 2012
On Thu, Apr 05, 2012 at 06:59:00PM +0200, Thilo Borgmann wrote:
> Am 05.04.12 17:08, schrieb Michael Niedermayer:
> > +all: $(TARGETS) logo
> > +
> > +DATE = $(shell date +%m%d)
> > +LOGO_STANDARD = $(shell ls src/logik/$(DATE)-standard)
> > +LOGO_DAY = $(shell ls src/logik/$(DATE).png)
> > +
> > +ifneq ($(LOGO_STANDARD),)
> > + LOGO_SRC = htdocs/FFmpeg_standard.png
> > +endif
> > +ifneq ($(LOGO_DAY),)
> > + LOGO_SRC = $(LOGO_DAY)
> > +endif
> > +ifneq ($(LOGO_SRC),)
> > +logo:
> > + cmp $(LOGO_SRC) htdocs/ffmpeg-logo.png || cp $(LOGO_SRC) htdocs/ffmpeg-logo.png
> > +endif
>
> Besides the comments from Reimar which mostly apply to both Makefiles (and not
> to copy the logo if it is still the same):
>
> I think your version of the Makefile does the logo copying more compact which is
> good but it is not as flexible/expandable as mine when it comes to do more
> things than just logo copying.
>
> Once there are more filytypes than -standard and .png in src/logik to control
> the appearance of the website, your version has either to write more variables
> and check even more cases _or_ set LOGO_DAY to src/logik/$(DATE).* which would
> make your version almost like mine.
> For my version the complete file-retrieving hunk stays always the same and there
> is one "clean" new target for each filetype and file to be altered.
The concern i had with your makefile was the liberal use of wildcards
and "find". And what happens when someone places crafted files in
there ...
[...]
--
Michael GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB
Concerning the gods, I have no means of knowing whether they exist or not
or of what sort they may be, because of the obscurity of the subject, and
the brevity of human life -- Protagoras
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 198 bytes
Desc: Digital signature
URL: <http://ffmpeg.org/pipermail/ffmpeg-devel/attachments/20120405/bb308980/attachment.asc>
More information about the ffmpeg-devel
mailing list