Skip to content

Commit

Permalink
Make blank after -j flag optional
Browse files Browse the repository at this point in the history
  • Loading branch information
mkrack committed Jan 11, 2022
1 parent de2e98d commit e076040
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
3 changes: 3 additions & 0 deletions tools/toolchain/install_cp2k_toolchain.sh
Original file line number Diff line number Diff line change
Expand Up @@ -372,6 +372,9 @@ while [ $# -ge 1 ]; do
shift
export NPROCS_OVERWRITE=$1
;;
-j[0-9]*)
export NPROCS_OVERWRITE=${1#-j}
;;
--no-check-certificate)
export DOWNLOADER_FLAGS="-n"
;;
Expand Down
2 changes: 1 addition & 1 deletion tools/toolchain/scripts/tool_kit.sh
Original file line number Diff line number Diff line change
Expand Up @@ -144,7 +144,7 @@ reverse() (
# get the number of processes available for compilation
get_nprocs() {
if [ -n "${NPROCS_OVERWRITE}" ]; then
echo "${NPROCS_OVERWRITE}"
echo ${NPROCS_OVERWRITE} | sed 's/^0*//'
elif $(command -v nproc >&- 2>&-); then
echo $(nproc --all)
else
Expand Down

0 comments on commit e076040

Please sign in to comment.