aboutsummaryrefslogtreecommitdiff
path: root/1-setup.sh
diff options
context:
space:
mode:
authorChris Titus <[email protected]>2021-10-26 09:06:50 -0500
committerChris Titus <[email protected]>2021-10-26 09:06:50 -0500
commitc5816896b29a74e2040fcecde494ee14331afa20 (patch)
tree338416b0d1e819ac9bb98285456d36aec34baf36 /1-setup.sh
parent3623487781cb98ed98993c00499079f6a5378239 (diff)
downloadArchTitus-c5816896b29a74e2040fcecde494ee14331afa20.tar.xz
ArchTitus-c5816896b29a74e2040fcecde494ee14331afa20.zip
Update 1-setup.sh
Testing makeflags for low processors
Diffstat (limited to '1-setup.sh')
-rwxr-xr-x1-setup.sh4
1 files changed, 3 insertions, 1 deletions
diff --git a/1-setup.sh b/1-setup.sh
index 4a1c2a6..c2ebd88 100755
--- a/1-setup.sh
+++ b/1-setup.sh
@@ -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 "-------------------------------------------------"