config 1.6 KB

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