osxcross/tools/get_cpu_count.sh
Thomas Pöchtrager 2c38fb673e move duplicate code into a single file
add debug option (OCDEBUG=1 ./<script>)
update README
2014-03-26 20:32:55 +01:00

19 lines
265 B
Bash
Executable File

#!/usr/bin/env bash
set -e
which cc &>/dev/null || { echo "1" && exit 0; }
prog="cpucount"
pushd "${0%/*}" >/dev/null 2>&1
case "$(uname -s)" in
*NT*)
prog="${prog}.exe" ;;
esac
test ! -f $prog && cc cpucount.c -o cpucount &>/dev/null
eval "./${prog}"