use nproc

This commit is contained in:
Gwenhael Le Moine 2020-12-07 10:29:33 +01:00
parent 857ea1a1a5
commit 873896aa84
No known key found for this signature in database
GPG key ID: FDFE3669426707A7

View file

@ -14,17 +14,16 @@ TMP=/tmp/$TAG
PKG=$TMP/pkg-$PRGNAM PKG=$TMP/pkg-$PRGNAM
OUTPUT=/tmp OUTPUT=/tmp
NUMJOBS=${NUMJOBS:-" -j4 "} NUMJOBS=${NUMJOBS:-" -j$(nproc)"}
GIT=${GIT:-"NO"} ANEW=${ANEW:-true}
ANEW=${ANEW:-no}
rm -fr $PKG rm -fr $PKG
VERSION=${VERSION:-$(curl https://www.kernel.org/feeds/kdist.xml | grep -o "[0-9.rc-]*: $BRANCH" | head -n1 | cut -d: -f1)} VERSION=${VERSION:-$(curl https://www.kernel.org/feeds/kdist.xml | grep -o "[0-9.rc-]*: $BRANCH" | head -n1 | cut -d: -f1)}
mkdir -p $PKG/usr/src/ mkdir -p $PKG/usr/src/
if [ -e /usr/src/linux-$VERSION ] && [[ "$ANEW" == "no" ]]; then if [ -e /usr/src/linux-$VERSION ] && [[ "$ANEW" != "true" ]]; then
cp -a /usr/src/linux-$VERSION $PKG/usr/src/ cp -a /usr/src/linux-$VERSION $PKG/usr/src/
else else
if [ $BRANCH == "stable" ]; then if [ $BRANCH == "stable" ]; then