Commit 5008f585 authored by Noud Kerver's avatar Noud Kerver

read /proc/cpuinfo instead of using nproc

parent 7a5b3e81
Pipeline #258 canceled with stage
in 25 minutes and 7 seconds
......@@ -42,11 +42,12 @@ function disk_space_free {
TOTAL_MEM=$(cat /proc/meminfo | grep MemTotal | awk '{ print $2 }')
PROCESSOR="$(cat /proc/cpuinfo | grep 'model name' | uniq | awk '{ split($0, a, "\\s+:\\s+"); print a[2] }')"
CPUS=$(cat /proc/cpuinfo | grep name | wc -l)
JAVA_VERSION="$(java -version 2>&1 | grep version | cut -d '"' -f 2)"
echo ""
echo "** System"
echo "* CPU: $PROCESSOR x${nproc}"
echo "* CPU: $PROCESSOR x$CPUS"
echo "* RAM: $TOTAL_MEM MB"
echo "* Free space: $(disk_space_free) MB"
echo "* Hostname: $(hostname)"
......@@ -75,7 +76,7 @@ if [ -z "$(stat .repo/local_manifests/roomservice.xml 2>/dev/null)" ]; then
fi
echo "Sync repositories"
repo sync -j$(nproc) --force-sync
repo sync -j$CPUS --force-sync
#####################################
......@@ -115,13 +116,13 @@ echo "# Android #"
echo "###########"
echo "Build recovery"
mka -j$(nproc) recoveryimage
mka -j$CPUS recoveryimage
echo "Build boot image"
mka -j$(nproc) bootimage
mka -j$CPUS bootimage
echo "Build system image"
mka -j$(nproc) systemimage
mka -j$CPUS systemimage
#####################################
......@@ -130,4 +131,4 @@ echo "# Package #"
echo "###########"
echo "Create flashable zip"
make -j$(nproc) bacon
make -j$CPUS bacon
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment