fix(os): Find /etc/makepkg.conf both with and without chroot (#1)

This commit is contained in:
hygienic-books 2023-03-04 23:21:06 +01:00
parent dd1fcb0c72
commit 58919e0d7f

View File

@ -388,9 +388,14 @@ function create_unpriv_user () {
}
function unleash_makepkg () {
local path_prefix
path_prefix='/mnt'
if we_are_changerooted; then
path_prefix=''
fi
sed -ri \
-e 's'$'\x1''^(#?(MAKEFLAGS=))[^\r\n\f]*'$'\x1''\2"-j$(nproc --ignore 1)"'$'\x1''g' \
'/mnt/etc/makepkg.conf'
"${path_prefix}"'/etc/makepkg.conf'
}
function get_aur_helper () {