diff --git a/scripts/process-archive.sh b/scripts/process-archive.sh index 12ba1b5a..21486755 100755 --- a/scripts/process-archive.sh +++ b/scripts/process-archive.sh @@ -1,7 +1,12 @@ #!/bin/bash -# XXX get this from /proc/cpuinfo... -THREADS=6 +# SPU threads to keep free... +KEEP_FREE=2 + +THREADS=`cat /proc/cpuinfo | awk '/^processor/{print $3}' | wc -l` +if [ $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 12ba1b5a..21486755 100755 --- a/ui (gen4)/archive/media/img/my/work/process-archive.sh +++ b/ui (gen4)/archive/media/img/my/work/process-archive.sh @@ -1,7 +1,12 @@ #!/bin/bash -# XXX get this from /proc/cpuinfo... -THREADS=6 +# SPU threads to keep free... +KEEP_FREE=2 + +THREADS=`cat /proc/cpuinfo | awk '/^processor/{print $3}' | wc -l` +if [ $KEEP_FREE ] ; then + THREADS=$((THREADS - KEEP_FREE)) +fi # TODO make this runnable from anywhere... # - prepend paths with './' only if local/relative