#!/bin/sh if ! which podman > /dev/null 2>&1; then echo "podman is not in your path" exit 1 fi CONTAINER_DIR="$(dirname "$(realpath "${0}")")" CONTAINER_TAG="dbt2-appimage" # Use the return code from `podman inspect` to determine if the container image # needs to be created. if ! podman inspect $CONTAINER_TAG > /dev/null 2>&1; then "${CONTAINER_DIR}/build-appimage-container" || exit 1 fi podman run \ --rm \ -v "${CONTAINER_DIR}/..:/usr/local/src/dbt2:rw,Z" \ --env PKG_CONFIG_PATH="/usr/lib/pkgconfig" \ -w /usr/local/src/dbt2 \ $CONTAINER_TAG \ make -f Makefile.cmake appimage # I wonder if there is a better way to make sure the artifacts are all owned by # the user running this. podman run \ --rm \ -v "${CONTAINER_DIR}/..:/usr/local/src/dbt2:rw,Z" \ -w /usr/local/src/dbt2 \ -u root \ $CONTAINER_TAG \ chown -R root:root builds/appimage/