blob: e8ac2e60e100e93c237f1b5b2d1b7202621fa137 (
plain)
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
40
41
42
43
|
#!/bin/bash
set -Eeuo pipefail
cd /home/build
git clone --depth=3 https://github.com/kunoisayami/repos
pushd repos
git checkout $CHECKOUT_BRANCH
git fetch --recurse-submodules -j2
git submodule update --init
popd
if [ $UID -eq 0 ]; then
chown -R build:build repos
echo "$TARGET_HOSTS" | base64 -d >> /etc/hosts
else
echo "$TARGET_HOSTS" | base64 -d | sudo tee -a /etc/hosts >/dev/null
fi
pushd repos
if [ $UID -eq 0 ]; then
su -c "echo $GPG_PRIV_KEY | base64 -d | gpg --import" build
su -c './utils/pkgbuild.sh' build
su -e -c './utils/ci-upload.sh' build
else
echo $GPG_PRIV_KEY | base64 -d | gpg --import
./utils/pkgbuild.sh
./utils/ci-upload.sh
fi
popd
|