aboutsummaryrefslogtreecommitdiff
path: root/hack/install_catatonit.sh
blob: 0a02b75ab20d0011d2e12c67731eb96a23636fa4 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
#!/usr/bin/env bash
BASE_PATH="/usr/libexec/podman"
CATATONIT_PATH="${BASE_PATH}/catatonit"
CATATONIT_VERSION="v0.1.7"
set -e

if [ -f $CATATONIT_PATH ]; then
	echo "skipping ... catatonit is already installed"
else
	echo "installing catatonit to $CATATONIT_PATH"
	buildDir=$(mktemp -d)
	git clone https://github.com/openSUSE/catatonit.git $buildDir

	pushd $buildDir
	echo `pwd`
	git reset --hard ${CATATONIT_VERSION}
	autoreconf -fi
	./configure
	make
	install ${SELINUXOPT} -d -m 755 $BASE_PATH
	install ${SELINUXOPT} -m 755 catatonit $CATATONIT_PATH
	popd

	rm -rf $buildDir
fi