File: build-appimage

package info (click to toggle)
pgtop 4.1.3-2
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 780 kB
  • sloc: ansic: 14,080; sh: 39; xml: 32; makefile: 2
file content (24 lines) | stat: -rwxr-xr-x 608 bytes parent folder | download
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