minor tweak...

Signed-off-by: Alex A. Naanou <alex.nanou@gmail.com>
This commit is contained in:
Alex A. Naanou 2019-04-01 11:26:49 +03:00
parent 6962d7c9a6
commit bbc9130bd6
2 changed files with 4 additions and 2 deletions

View File

@ -4,10 +4,11 @@
KEEP_FREE=2
THREADS=`cat /proc/cpuinfo | awk '/^processor/{print $3}' | wc -l`
if [ $KEEP_FREE ] ; then
if [ $KEEP_FREE ] && (( THREADS > KEEP_FREE )) ; then
THREADS=$((THREADS - KEEP_FREE))
fi
# TODO make this runnable from anywhere...
# - prepend paths with './' only if local/relative

View File

@ -4,10 +4,11 @@
KEEP_FREE=2
THREADS=`cat /proc/cpuinfo | awk '/^processor/{print $3}' | wc -l`
if [ $KEEP_FREE ] ; then
if [ $KEEP_FREE ] && (( THREADS > KEEP_FREE )) ; then
THREADS=$((THREADS - KEEP_FREE))
fi
# TODO make this runnable from anywhere...
# - prepend paths with './' only if local/relative