podman/hack/install_catatonit.sh
Sascha Grunert ba9f18e2b8
Use bash binary from env instead of /bin/bash for scripts
It's not possible to run any of the scripts on distributions which do
have `bash` not in `/bin`. This is being fixed by using `/usr/bin/env
bash` instead.

Signed-off-by: Sascha Grunert <sgrunert@suse.com>
2020-08-17 10:42:23 +02:00

26 lines
582 B
Bash
Executable file

#!/usr/bin/env bash
BASE_PATH="/usr/libexec/podman"
CATATONIT_PATH="${BASE_PATH}/catatonit"
CATATONIT_VERSION="v0.1.4"
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