build 1.57 KB
Newer Older
1
2
3
4
5
6
7
8
9
#!/bin/sh
[% c("var/set_default_env") -%]
# reset HOME which was changed by var/set_default_env, for gpg
[% IF ENV.HOME %]export HOME="[% ENV.HOME %]"[% END %]
destdir="[% dest_dir _ '/' _ c("var/publish_dir") %]"
mkdir -p "$destdir"
[% IF c("var/torbrowser-windows-i686") -%]
  mv [% c('input_files_by_name/windows-i686') %]/* "$destdir"/
  mv [% c('input_files_by_name/windows-expert-bundle') %]/* "$destdir"/
10
[% END -%]
11
12
13
14
[% IF c("var/torbrowser-windows-x86_64") -%]
  mv [% c('input_files_by_name/windows-x86_64') %]/* "$destdir"/
  mv [% c('input_files_by_name/windows64-expert-bundle') %]/* "$destdir"/
[% END -%]
15
16
17
18
19
20
21
22
23
24
[% IF c("var/torbrowser-osx-x86_64") -%]
  mv [% c('input_files_by_name/osx-x86_64') %]/* "$destdir"/
[% END -%]
[% IF c("var/torbrowser-linux-i686") -%]
  mv [% c('input_files_by_name/linux-i686') %]/* "$destdir"/
[% END -%]
[% IF c("var/torbrowser-linux-x86_64") -%]
  mv [% c('input_files_by_name/linux-x86_64') %]/* "$destdir"/
[% END -%]
cd "$destdir"
25
26
27
28
29
30
31
cat > .htaccess <<EOF
RewriteEngine On
RewriteRule ^sha256sums.txt$ sha256sums-unsigned-build.txt
RewriteRule ^sha256sums.txt.asc$ sha256sums-unsigned-build.txt.asc
RewriteRule ^sha256sums.incrementals.txt$ sha256sums-unsigned-build.incrementals.txt
RewriteRule ^sha256sums.incrementals.txt.asc$ sha256sums-unsigned-build.incrementals.txt.asc
EOF
32
sha256sum $(ls -1 *.exe *.tar.xz *.dmg *.mar *.zip *.tar.gz | grep -v '\.incremental\.mar$' | sort) > sha256sums-unsigned-build.txt
33
34
35
36
[% IF c("var/sign_build") -%]
  gpg -abs [% c("var/sign_build_gpg_opts") %] sha256sums-unsigned-build.txt
[% END -%]
cat sha256sums-unsigned-build.txt