config 1.6 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849
  1. # vim: filetype=yaml sw=2
  2. version: '[% c("var/ff_version") %]-[% c("var/ff_build") %]'
  3. filename: '[% project %]-[% c("version") %]-[% c("var/osname") %]-[% c("var/build_id") %]'
  4. var:
  5. ff_version: '[% pc("firefox", "var/firefox_version") %]'
  6. ff_build: build1
  7. ff_arch: linux-i686
  8. input_filename: 'dl-langpack-[% c("var/ff_arch") %]-[% c("version") %]'
  9. targets:
  10. windows-i686:
  11. var:
  12. ff_arch: win32
  13. windows-x86_64:
  14. var:
  15. ff_arch: win64
  16. osx-x86_64:
  17. var:
  18. ff_arch: mac
  19. input_files:
  20. - URL: 'https://ftp.mozilla.org/pub/firefox/candidates/[% c("var/ff_version") %]-candidates/[% c("var/ff_build") %]/SHA512SUMS'
  21. filename: 'SHA512SUMS-[% c("version") %]'
  22. gpg_keyring: firefox.gpg
  23. sig_ext: asc
  24. file_gpg_id: 1
  25. - filename: '[% c("var/input_filename") %]'
  26. refresh_input: 1
  27. exec: |
  28. #!/bin/bash
  29. set -e
  30. [% SET outdir = c("var/input_filename") %]
  31. mkdir -p [% dest_dir %]/[% outdir %]
  32. [% FOREACH lang = c('var/locales') %]
  33. [% SET lang = tmpl(lang) %]
  34. [% SET ffver = c("var/ff_version");
  35. SET ffbuild = c("var/ff_build");
  36. SET ffarch = c("var/ff_arch");
  37. SET URL = "https://ftp.mozilla.org/pub/mozilla.org/firefox/candidates/" _ ffver _ '-candidates/' _ ffbuild _ '/' _ ffarch _ '/xpi/' _ lang _ '.xpi';
  38. SET filename = outdir _ '/' _ lang _ '.xpi'; %]
  39. test -f [% dest_dir %]/[% filename %] || \
  40. [% GET c("urlget", { filename => filename _ '-tmp', URL => URL }); %]
  41. test -f [% dest_dir %]/[% filename %] || \
  42. mv -f [% dest_dir %]/[% filename %]-tmp [% dest_dir %]/[% filename %]
  43. [% END %]