-
Notifications
You must be signed in to change notification settings - Fork 0
/
build_all.sh
39 lines (30 loc) · 1 KB
/
build_all.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
#!/bin/bash
set -eu
declare -ra targets=(
'alpha-unknown-linux-gnu'
'x86_64-unknown-linux-gnu'
'i386-unknown-linux-gnu'
'arm-unknown-linux-gnueabi'
'arm-unknown-linux-gnueabihf'
'hppa-unknown-linux-gnu'
'aarch64-unknown-linux-gnu'
'mips-unknown-linux-gnu'
'mipsel-unknown-linux-gnu'
'powerpc-unknown-linux-gnu'
's390-unknown-linux-gnu'
's390x-unknown-linux-gnu'
'sparc-unknown-linux-gnu'
'powerpc64le-unknown-linux-gnu'
'mips64el-unknown-linux-gnuabi64'
)
declare -r tarballs_directory="${PWD}/kal-tarballs"
[ -d "${tarballs_directory}" ] || mkdir "${tarballs_directory}"
source './tools/setup_toolchain.sh'
source './submodules/obggcc/tools/setup_toolchain.sh'
for target in "${targets[@]}"; do
bash './build.sh' "${target}"
declare tarball_filename="${tarballs_directory}/${target}.tar.xz"
tar --directory='/tmp' --create --file=- 'kal' | xz --threads=0 --compress -9 > "${tarball_filename}"
sha256sum "${tarball_filename}" > "${tarball_filename}.sha256"
rm --recursive --force '/tmp/kal'
done