1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24
|
#!/bin/sh
if ! which podman > /dev/null 2>&1; then
echo "podman is not in your path"
exit 1
fi
CONTAINER_DIR=$(realpath "$(dirname "$0")")
CONTAINER_TAG="pg_top-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 \
--user "$(id -u):$(id -u)" \
--userns=keep-id \
-v "${CONTAINER_DIR}/..:/usr/local/src/pg_top:rw,Z" \
-w /usr/local/src/pg_top \
$CONTAINER_TAG \
make -f Makefile.cmake appimage
|