summaryrefslogtreecommitdiffhomepage
path: root/ci/setup-arch.sh
blob: 62873f4714b36c06ed3756f220508dbb16b633d2 (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
#!/bin/sh
config=/etc/pacman.conf
cache=/var/cache/pacman/pkg
keyid=E4CA8487EDD0C757273330BD689F26A2F234129A  # developer key, not available in keyservers, be cautious
if ! grep '^\[multilib\]' $config; then
	echo "[multilib]" >>$config
	echo "Include = /etc/pacman.d/mirrorlist" >>$config
fi
if ! grep '^\[ignore\]' $config; then
	echo "[ignore]" >>$config
	echo 'Server = https://ftp.ignore.pl/pacman/$arch' >>$config
fi
if ! pacman-key --finger $keyid; then
	curl https://ftp.ignore.pl/pacman/public.gpg | pacman-key --add -
	pacman-key --lsign-key $keyid
fi
packages=$(mktemp)
ls $cache >$packages
pacman --noconfirm -Syyuu && pacman --noconfirm -S git butler-git cmake mingw-w64-toolchain wine  # assume base-devel
if [ "$1" = "-C" ]; then
	ls $cache >>$packages
	sort $packages | uniq -D | xargs rm -f
fi
rm -f $packages