mirror of
https://git.mirrors.martin98.com/https://github.com/slic3r/Slic3r.git
synced 2025-08-17 19:05:59 +08:00
Added test for sysctl path
This commit is contained in:
parent
c6560508d7
commit
83ec3d7e00
@ -1,7 +1,13 @@
|
|||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
|
|
||||||
|
# Our sysctl call may be run as normal user,
|
||||||
|
# but /sbin is not always in normal users' PATH.
|
||||||
|
if [[ -f /sbin/sysctl && -x /sbin/sysctl ]]; then sysctl_bin=/sbin/sysctl
|
||||||
|
else sysctl_bin=sysctl # If not found in sbin, hope
|
||||||
|
fi
|
||||||
|
|
||||||
export ROOT=`pwd`
|
export ROOT=`pwd`
|
||||||
export NCORES=`sysctl -n hw.ncpu`
|
export NCORES=`"$sysctl_bin" -n hw.ncpu`
|
||||||
|
|
||||||
while getopts ":ih" opt; do
|
while getopts ":ih" opt; do
|
||||||
case ${opt} in
|
case ${opt} in
|
||||||
|
Loading…
x
Reference in New Issue
Block a user