hash_incrementals 702 B

1234567891011121314151617
  1. #!/bin/bash
  2. [% IF c("var/sign_build") -%]
  3. # var/set_default_env will reset HOME. We need to restore it to use gpg.
  4. old_HOME="$HOME"
  5. [% END -%]
  6. [% c("var/set_default_env") -%]
  7. [% IF c("var/nightly") -%]
  8. cd [% shell_quote(path(dest_dir)) %]/[% c("version") %]
  9. [% ELSE -%]
  10. cd [% shell_quote(path(dest_dir)) %]/[% c("var/signed_status") %]/[% c("version") %]-[% c("var/torbrowser_build") %]
  11. [% END -%]
  12. sha256sum `ls -1 | grep '\.incremental\.mar$' | sort` > sha256sums-[% c("var/signed_status") %]-build.incrementals.txt
  13. [% IF c("var/sign_build") -%]
  14. export HOME="$old_HOME"
  15. gpg -abs [% c("var/sign_build_gpg_opts") %] sha256sums-[% c("var/signed_status") %]-build.incrementals.txt
  16. [% END -%]