parabola-vmbootstrap/src/hooks/hook-parabola-buildbox.sh
Jacob Hrbek 1a85688c27
QA: Replace shebang with env-variant
This is to provide a compatibility with nix such as GNU Guix to use the
project painlessly without the need of deploying a sandboxed FHS
environment.

Signed-off-by: Jacob Hrbek <kreyren@rixotstudio.cz>
2023-02-23 09:19:14 +01:00

28 lines
755 B
Bash

#!/usr/bin/env bash
set -e
# essential tools
pacman -S --noconfirm base-devel libretools
# matter of preference
pacman -S --noconfirm vim bash-completion
# create builduser
useradd -mU parabola
chpasswd <<<"parabola:parabola"
# enable sudo access
cat >> /etc/sudoers <<EOF
parabola ALL=(ALL) NOPASSWD: ALL
EOF
# setup environment
sed -i 's|#PKGDEST=.*|PKGDEST=/home/parabola/output/packages|' /etc/makepkg.conf
sed -i 's|#SRCDEST=.*|PKGDEST=/home/parabola/output/sources|' /etc/makepkg.conf
sed -i 's|#SRCPKGDEST=.*|PKGDEST=/home/parabola/output/srcpackages|' /etc/makepkg.conf
sed -i 's|#LOGDEST=.*|PKGDEST=/home/parabola/output/makepkglogs|' /etc/makepkg.conf
sed -i '/^OPTIONS=/ s/debug/!debug/' /etc/makepkg.conf
sudo -u parabola createworkdir