This way, you have a correct behaviour even without setting ELIXIR_THREADS Signed-off-by: Michael Opdenacker <michael.opdenacker@bootlin.com>
24 lines
958 B
Bash
Executable file
24 lines
958 B
Bash
Executable file
#!/bin/bash
|
|
# This file is part of Elixir, a source code cross-referencer.
|
|
#
|
|
# Copyright (C) 2019--2023 Michael Opdenacker and contributors
|
|
#
|
|
# Elixir is free software: you can redistribute it and/or modify
|
|
# it under the terms of the GNU Affero General Public License as published by
|
|
# the Free Software Foundation, either version 3 of the License, or
|
|
# (at your option) any later version.
|
|
#
|
|
# Elixir is distributed in the hope that it will be useful,
|
|
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
# GNU Affero General Public License for more details.
|
|
#
|
|
# You should have received a copy of the GNU Affero General Public License
|
|
# along with Elixir. If not, see <http://www.gnu.org/licenses/>.
|
|
|
|
if [ "$ELIXIR_THREADS" = "" ]
|
|
then
|
|
# Set number of threads to the number of CPU cores
|
|
# available to the current process
|
|
export ELIXIR_THREADS=`nproc`
|
|
fi
|