diff --git a/scripts/Arch/Config/base-devel/install.sh b/scripts/Arch/Config/base-devel/install.sh index 75842cf1..ba2e41fd 100755 --- a/scripts/Arch/Config/base-devel/install.sh +++ b/scripts/Arch/Config/base-devel/install.sh @@ -3,11 +3,13 @@ pushd "${BASH_SOURCE%/*}" > /dev/null; configFile="/etc/makepkg.conf"; +customFile="$configFile.d/makepkg.conf"; pattern="^\\(OPTIONS=(.*[( ]\\)\\(debug[ )].*)\\)$"; -if cat "$configFile" | grep "$pattern" > /dev/null +if [ ! -f "$customFile" ]; then - sudo sed -i "/$pattern/s/$pattern/\\1!\\2/" "$configFile" + sed "/$pattern/{ s/$pattern/\\1!\\2/; p; }; d" "$configFile" | sudo tee "$customFile" > /dev/null; + echo "MAKEFLAGS=\"-j\$(nproc)\"" | sudo tee --append "$customFile" > /dev/null; fi; popd > /dev/null;