config 1.7 KB

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