Configure base-devel
using conf.d
directory
This commit is contained in:
parent
8339cb3006
commit
be95688d27
1 changed files with 4 additions and 2 deletions
|
@ -3,11 +3,13 @@
|
||||||
pushd "${BASH_SOURCE%/*}" > /dev/null;
|
pushd "${BASH_SOURCE%/*}" > /dev/null;
|
||||||
|
|
||||||
configFile="/etc/makepkg.conf";
|
configFile="/etc/makepkg.conf";
|
||||||
|
customFile="$configFile.d/makepkg.conf";
|
||||||
pattern="^\\(OPTIONS=(.*[( ]\\)\\(debug[ )].*)\\)$";
|
pattern="^\\(OPTIONS=(.*[( ]\\)\\(debug[ )].*)\\)$";
|
||||||
|
|
||||||
if cat "$configFile" | grep "$pattern" > /dev/null
|
if [ ! -f "$customFile" ];
|
||||||
then
|
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;
|
fi;
|
||||||
|
|
||||||
popd > /dev/null;
|
popd > /dev/null;
|
||||||
|
|
Loading…
Reference in a new issue