repertory/scripts/make_win32.sh
Scott E. Graves a024f81e5d
All checks were successful
BlockStorage/repertory_linux_builds/pipeline/head This commit looks good
BlockStorage/repertory_osx_builds/pipeline/head This commit looks good
fix runaway thread
2024-02-03 10:41:38 -06:00

29 lines
954 B
Bash
Executable File

#!/bin/bash
NUM_JOBS=${MY_NUM_JOBS}
if [[ -z "${NUM_JOBS}" ]]; then
NUM_JOBS=$(getconf _NPROCESSORS_ONLN 2> /dev/null || getconf NPROCESSORS_ONLN 2> /dev/null || echo 1)
if [ "${NUM_JOBS}" -gt "2" ]; then
NUM_JOBS=$(expr ${NUM_JOBS} - 2)
elif [ "${NUM_JOBS}" -gt "1" ]; then
NUM_JOBS=$(expr ${NUM_JOBS} - 1)
fi
fi
BUILD_TYPE=$1
BUILD_CLEAN=$2
SOURCE_DIR=$(dirname "$0")/..
SOURCE_DIR=$(realpath ${SOURCE_DIR})
NAME=mingw64
BUILD_ARCH=64_bit
docker stop repertory_${NAME}
docker rm repertory_${NAME}
docker build --build-arg NUM_JOBS=${MY_NUM_JOBS} -t repertory:${NAME} - < ${SOURCE_DIR}/docker/${BUILD_ARCH}/${NAME} &&
docker run -td -u $(id -u):$(id -g) --name repertory_${NAME} -w ${SOURCE_DIR} -v ${SOURCE_DIR}:${SOURCE_DIR}:rw,z repertory:${NAME} &&
docker exec repertory_${NAME} /bin/bash -c "${SOURCE_DIR}/scripts/make_common.sh ${BUILD_TYPE} \"${BUILD_CLEAN}\" 1"
docker stop repertory_${NAME}
docker rm repertory_${NAME}