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