mirror of
https://github.com/cp2k/cp2k.git
synced 2026-07-28 06:05:29 -04:00
Make blank after -j flag optional
This commit is contained in:
parent
de2e98d62d
commit
e076040b12
2 changed files with 4 additions and 1 deletions
|
|
@ -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"
|
||||
;;
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue