File: vars.sh

package info (click to toggle)
tango 10.0.2%2Bdfsg1-4
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 89,936 kB
  • sloc: cpp: 201,786; sh: 1,645; python: 953; java: 800; perl: 467; javascript: 447; xml: 325; makefile: 272; sql: 72; ruby: 24
file content (22 lines) | stat: -rwxr-xr-x 324 bytes parent folder | download | duplicates (4)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
#! /usr/bin/env bash

set -e

function ncore()
{
    os=$(uname -s)
    case ${os} in
        Linux) ncpu=$(nproc);;
        Darwin) ncpu=$(sysctl -n hw.logicalcpu);;
        *) ncpu=-1;;
    esac

    echo "${ncpu}"
}

SOURCE_DIR=.
BUILD_DIR=${SOURCE_DIR}/build
INSTALL_DIR=/home/tango
NUM_PROCESSORS=$(ncore)

unset ncore