summaryrefslogtreecommitdiffstats
path: root/tools/build-appimage
blob: 169f8b4d9c3bcf74749890886325009c0dead2d9 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
#!/bin/sh

if ! which podman > /dev/null 2>&1; then
	echo "podman is not in your path"
	exit 1
fi

CONTAINER_DIR=$(readlink -f "$(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 -v "${CONTAINER_DIR}/..:/usr/local/src/pg_top:rw" \
		-w /usr/local/src/pg_top $CONTAINER_TAG \
		make appimage-podman