Turned CPU detection into a function
This commit is contained in:
parent
2c6e9e1a31
commit
52756be36a
|
@ -2,8 +2,10 @@
|
||||||
# vi: ts=3 sw=3 et
|
# vi: ts=3 sw=3 et
|
||||||
|
|
||||||
# Architecture Assignment
|
# Architecture Assignment
|
||||||
[ -z "${ARCH}" ] && ARCH="`uname -m`"
|
config_cpu() {
|
||||||
case "${ARCH}" in
|
[ -n "${2}" ] && ARCH=${1}
|
||||||
|
[ -z "${ARCH}" ] && ARCH="`uname -m`"
|
||||||
|
case "${ARCH}" in
|
||||||
x86_64)
|
x86_64)
|
||||||
X86=true
|
X86=true
|
||||||
X86_64=true
|
X86_64=true
|
||||||
|
@ -21,11 +23,14 @@ case "${ARCH}" in
|
||||||
armv7l) ARMV7=true ;;
|
armv7l) ARMV7=true ;;
|
||||||
esac
|
esac
|
||||||
;;
|
;;
|
||||||
esac
|
esac
|
||||||
if [ -n "${PROCESSOR_ARCHITEW6432}" -a "${PROCESSOR_ARCHITEW6432}" = "AMD64" ]; then
|
if [ -n "${PROCESSOR_ARCHITEW6432}" -a "${PROCESSOR_ARCHITEW6432}" = "AMD64" ]; then
|
||||||
ARCH=x86_64
|
ARCH=x86_64
|
||||||
X86=true && X86_64=true
|
X86=true && X86_64=true
|
||||||
fi
|
fi
|
||||||
|
}
|
||||||
|
|
||||||
|
config_cpu
|
||||||
|
|
||||||
if [ -z "$JOBS" ]; then
|
if [ -z "$JOBS" ]; then
|
||||||
if command -v nproc >/dev/null; then
|
if command -v nproc >/dev/null; then
|
||||||
|
|
Loading…
Reference in New Issue