Message ID | 1484214417-15443-1-git-send-email-siddhesh@sourceware.org |
---|---|
State | New |
Headers | show |
On Thu, 12 Jan 2017, Siddhesh Poyarekar wrote: > +# Update translations from the translation project. > +TRANSLATIONS_URL = http://translationproject.org/latest/libc Should preferably use https. > +WGET = wget > + > +update-translations: > + WGET -qO- $(TRANSLATIONS_URL) | sed -n 's|.*href="\([^"]\+po\)".*|\1|p' | \ > + while read f; do \ > + WGET -O $(objdir)/$$f-tmp $(TRANSLATIONS_URL)/$$f && \ Does this actually work? I'd expect you to need to use $(WGET) not plain WGET.
On Thursday 12 January 2017 07:29 PM, Joseph Myers wrote: > On Thu, 12 Jan 2017, Siddhesh Poyarekar wrote: > >> +# Update translations from the translation project. >> +TRANSLATIONS_URL = http://translationproject.org/latest/libc > > Should preferably use https. OK. >> +WGET = wget >> + >> +update-translations: >> + WGET -qO- $(TRANSLATIONS_URL) | sed -n 's|.*href="\([^"]\+po\)".*|\1|p' | \ >> + while read f; do \ >> + WGET -O $(objdir)/$$f-tmp $(TRANSLATIONS_URL)/$$f && \ > > Does this actually work? I'd expect you to need to use $(WGET) not plain > WGET. Ugh, I think I did that after the merge and did not test it, sorry :/ Siddhesh
diff --git a/po/Makefile b/po/Makefile index 302c3b6..fdf8fa0 100644 --- a/po/Makefile +++ b/po/Makefile @@ -109,3 +109,14 @@ linguas: $(pofiles:$(podir)/%=%) linguas.mo: $(pofiles:$(podir)/%.po=%.mo) endif + +# Update translations from the translation project. +TRANSLATIONS_URL = http://translationproject.org/latest/libc +WGET = wget + +update-translations: + WGET -qO- $(TRANSLATIONS_URL) | sed -n 's|.*href="\([^"]\+po\)".*|\1|p' | \ + while read f; do \ + WGET -O $(objdir)/$$f-tmp $(TRANSLATIONS_URL)/$$f && \ + mv -f $(objdir)/$$f-tmp $$f; \ + done