From bbc9130bd6f5b3a57e662386ee7522f2061e9991 Mon Sep 17 00:00:00 2001 From: "Alex A. Naanou" Date: Mon, 1 Apr 2019 11:26:49 +0300 Subject: [PATCH] minor tweak... Signed-off-by: Alex A. Naanou --- scripts/process-archive.sh | 3 ++- ui (gen4)/archive/media/img/my/work/process-archive.sh | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/scripts/process-archive.sh b/scripts/process-archive.sh index 21486755..ce8eef08 100755 --- a/scripts/process-archive.sh +++ b/scripts/process-archive.sh @@ -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 diff --git a/ui (gen4)/archive/media/img/my/work/process-archive.sh b/ui (gen4)/archive/media/img/my/work/process-archive.sh index 21486755..ce8eef08 100755 --- a/ui (gen4)/archive/media/img/my/work/process-archive.sh +++ b/ui (gen4)/archive/media/img/my/work/process-archive.sh @@ -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