diff --git a/setup.sh b/setup.sh index 6e264b1..e47100e 100644 --- a/setup.sh +++ b/setup.sh @@ -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 () {