summaryrefslogtreecommitdiff
path: root/bin/aport-bootstrap.sh
blob: e14eeef89cb0bf9dc668eae082f83ee17bc34ecc (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
#!/bin/sh

[[ -z "$ALPINE_UID" ]] && ( echo "No ALPINE_UID set" && exit 1 )

# git-perl for add --interactive
apk add \
	alpine-sdk \
	atools \
	git-perl \
	less \
	linux-firmware-none \
	shellcheck \
	spdx-licenses-list \
	sudo \
	vim \
	;

addgroup -g $ALPINE_UID mcrute
adduser -s /bin/sh -D -G mcrute -u $ALPINE_UID mcrute
addgroup mcrute wheel
addgroup mcrute abuild

sed -i '/# %wheel .*NOPASSWD.*/s/^# //' /etc/sudoers

chgrp abuild /var/cache/distfiles
chmod g+w /var/cache/distfiles

ln -s /abuild-keys /home/mcrute/.abuild

echo "set mouse=" >> /home/mcrute/.vimrc
cp /opt/.gitconfig /home/mcrute/.gitconfig
cp /opt/.gitconfig-personal /home/mcrute/.gitconfig-personal
chown mcrute:mcrute /home/mcrute/.gitconfig /home/mcrute/.vimrc /home/mcrute/.gitconfig-personal

su - mcrute

export APORTSDIR=/aports

exec /bin/sh