Blame docker/fedora-cross-win/run.sh

efc424
#!/bin/bash
efc424
efc424
SCRIPT_DIR=$(cd `dirname "$0"`; pwd)
efc424
BASE_DIR=`dirname "$SCRIPT_DIR"`
efc424
BASE_DIR=`dirname "$BASE_DIR"`
efc424
DATA_DIR="$BASE_DIR/docker-builder-data"
efc424
BUILD_DIR=$DATA_DIR/build
efc424
CONFIG_FILE="$BASE_DIR/config.sh"
efc424
PACKET_BUILD_DIR="$BUILD_DIR/packet"
efc424
SCRIPT_BUILD_DIR="$BUILD_DIR/script"
efc424
if [ -f $CONFIG_FILE ]; then
efc424
	source $CONFIG_FILE
efc424
fi
efc424
mkdir -p $PACKET_BUILD_DIR
efc424
3b09af
export NATIVE_PLATFORM=fedora
3b09af
if [ -z "$PLATFORM" ]; then
3b09af
    export PLATFORM=win
efc424
fi
3b09af
if [ -z "$TASK" ]; then
3b09af
    export TASK=builder-$NATIVE_PLATFORM
efc424
fi
3b09af
export INSTANCE=$TASK-$PLATFORM$ARCH
efc424
3b09af
docker stop "$INSTANCE" || true
3b09af
docker rm "$INSTANCE" || true
efc424
docker run -it \
3b09af
    --name "$INSTANCE" \
efc424
    --privileged=true \
efc424
    $DOCKER_RUN_OPTIONS \
efc424
    -v "$PACKET_BUILD_DIR:/build/packet" \
efc424
    -v "$SCRIPT_BUILD_DIR:/build/script" \
3b09af
    -e NATIVE_PLATFORM="$NATIVE_PLATFORM" \
3b09af
    -e NATIVE_ARCH="$NATIVE_ARCH" \
efc424
    -e PLATFORM="$PLATFORM" \
3b09af
    -e ARCH="$ARCH" \
3b09af
    -e THREADS="$THREADS" \
efc424
    morevna/build-fedora-cross-win \
efc424
    /build/script/common/manager.sh "$@"
efc424