Update 1-setup.sh

Testing makeflags for low processors
This commit is contained in:
Chris Titus 2021-10-26 09:06:50 -05:00
parent 3623487781
commit c5816896b2
1 changed files with 3 additions and 1 deletions

View File

@ -24,10 +24,12 @@ nc=$(grep -c ^processor /proc/cpuinfo)
echo "You have " $nc" cores."
echo "-------------------------------------------------"
echo "Changing the makeflags for "$nc" cores."
TOTALMEM=$(cat /proc/meminfo | grep -i 'memtotal' | grep -o '[[:digit:]]*')
if [[ $TOTALMEM -gt 8000000 ]]; then
sudo sed -i 's/#MAKEFLAGS="-j2"/MAKEFLAGS="-j$nc"/g' /etc/makepkg.conf
echo "Changing the compression settings for "$nc" cores."
sudo sed -i 's/COMPRESSXZ=(xz -c -z -)/COMPRESSXZ=(xz -c -T $nc -z -)/g' /etc/makepkg.conf
fi
echo "-------------------------------------------------"
echo " Setup Language to US and set locale "
echo "-------------------------------------------------"