ioef/jenkins-ci-build.sh

33 lines
637 B
Bash
Raw Normal View History

2013-03-21 15:49:47 +00:00
#!/bin/bash
UNAME=`uname`
2013-03-21 15:49:47 +00:00
MASTER_DIR=`dirname $0`
BUILD_DEFAULT="release"
2013-03-21 15:49:47 +00:00
cd ${MASTER_DIR}
if [ "$OPTIONS" = "all_options" ];
then
export USE_CODEC_VORBIS=1
export USE_FREETYPE=1
fi
if [ "$UNAME" == "Darwin" ]; then
CORES=`sysctl -n hw.ncpu`
elif [ "$UNAME" == "Linux" ]; then
CORES=`awk '/^processor/ { N++} END { print N }' /proc/cpuinfo`
fi
echo "platform : ${UNAME}"
echo "cores : ${CORES}"
if [ "${BUILD_TYPE}" == "" ]; then
BUILD_TYPE="${BUILD_DEFAULT}"
echo "build type : defaulting to ${BUILD_TYPE}"
else
echo "build type : ${BUILD_TYPE}"
fi
2013-03-21 15:49:47 +00:00
2013-03-22 16:53:29 +00:00
make -j${CORES} distclean ${BUILD_TYPE}
2013-03-21 15:49:47 +00:00
exit $?