-
Notifications
You must be signed in to change notification settings - Fork 2
/
install.sh
executable file
·47 lines (35 loc) · 872 Bytes
/
install.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
40
41
42
43
44
45
46
47
#!/bin/bash
set -e
source settings.conf
REPO_DIR="$PWD"/repo
AUTO_GPG='gpg --batch --no-tty --yes'
if [ -z "$REPO_NAME" ]
then
REPO_NAME=local
fi
export GPGKEY="$sign_key"
export MAKEPKG_CONF="$PWD"/makepkg.conf
export PACKAGER="$(git show -s --format='%an <%ae>')"
sudo pacman -Syu --noconfirm
if [ ! -z "$GPGKEY" ]
then
$AUTO_GPG --import package-key.pgp
$AUTO_GPG --export --output public-package-key.pgp "$GPGKEY"
sudo pacman-key --init
sudo pacman-key -a public-package-key.pgp
sudo pacman-key --lsign-key "$GPGKEY"
SIGNING_ARGS="--sign"
fi
$AUTO_GPG --recv-keys "${trustedpgpkeys[@]}"
for k in "${trustedpgpkeys[@]}"
do
$AUTO_GPG --lsign-key "$k" || :
done
mkdir -p "$REPO_DIR"
for p in "${packages[@]}"
do
pushd "$p"
makepkg -si $SIGNING_ARGS --noconfirm || :
popd
done
repo-add -s "$REPO_DIR"/"$REPO_NAME".db.tar.xz "$REPO_DIR"/*.pkg.tar.xz