blender/build_files
Lawrence D'Oliveiro 554eca1c28 Avoid UUOC in install_deps.sh
The file ##build_files/build_environment/install_deps.sh## contains the following line:

  THREADS=`cat /proc/cpuinfo | grep processor | wc -l`

The command within the backticks is a [[ http://catb.org/jargon/html/U/UUOC.html | Useless Use Of Cat ]].

A more compact way of writing the same thing (saving two subprocesses) is

  THREADS=`grep -c processor /proc/cpuinfo`

or (using POSIX-preferred command-substitution parentheses instead of backticks)

  THREADS=$(grep -c processor /proc/cpuinfo)

But the most compact, and least Linux-specific, way is to use the ##nproc##(1) command from the [[ http://www.gnu.org/software/coreutils/manual/html_node/nproc-invocation.html | GNU coreutils package ]]:

  THREADS=$(nproc)

Reviewers: sergey, mont29

Reviewed by: mont29

Differential Revision: https://developer.blender.org/D255
2014-02-22 14:31:43 +01:00
..
build_environment Avoid UUOC in install_deps.sh 2014-02-22 14:31:43 +01:00
buildbot Scons: refactor cycles kernel code to avoid building the AVX kernel with 2014-01-28 23:02:06 +01:00
cmake Fixes for buildinfo hash/branch detection 2014-02-20 21:43:30 +06:00
package_spec Add datafiles/locale/languages to blender.spec.in for CPack 2012-12-28 23:30:34 +00:00
scons Fixes for buildinfo hash/branch detection 2014-02-20 21:43:30 +06:00