mirror of
https://github.com/linuxserver/ffmpeg-builder.git
synced 2026-05-04 00:00:57 +08:00
reverse elif and if for cpu cores
This commit is contained in:
parent
30579d3e3b
commit
7079f9defc
@ -114,10 +114,10 @@ RUN set -ex && \
|
||||
# as one less than actual available, if 6 or more set to two less than available, otherwise use all cores
|
||||
RUN \
|
||||
CPU_CORES=$(cat /proc/cpuinfo | grep processor | wc -l) && \
|
||||
if [ $CPU_CORES -gt 3 ]; then \
|
||||
CPU_CORES=$(expr $CPU_CORES - 1); \
|
||||
elif [ $CPU_CORES -gt 5 ]; then \
|
||||
if [ $CPU_CORES -gt 5 ]; then \
|
||||
CPU_CORES=$(expr $CPU_CORES - 2); \
|
||||
elif [ $CPU_CORES -gt 3 ]; then \
|
||||
CPU_CORES=$(expr $CPU_CORES - 1); \
|
||||
fi && \
|
||||
echo $CPU_CORES > /tmp/cpu-cores
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user