#!/bin/sh

INPUT_UID=$(id -u)
INPUT_GID=$(id -g)

if [ ! -e toolchain.sh ]; then
    curl http://ci-files02-hki.intra.qt.io/packages/jenkins/enterprise/b2qt/yocto/6.0.0/poky-glibc-x86_64-meta-toolchain-qt6-aarch64-qemuarm64-toolchain-3.1.sh -o toolchain.sh
fi

sed -i Dockerfile \
    -e "s/<UID>/${INPUT_UID}/" \
    -e "s/<GID>/${INPUT_GID}/"

docker build -f Dockerfile . -t b2qt-qemuarm64:6.0.0

