#!/bin/sh -e
#
# penter - wrapper to enter Podman container, running a bash shell inside it

name="${1:?needs one argument}"

containerId=$(podman ps --quiet --filter "name=$1")

if [ -n "${containerId}" ]; then
  podman exec --interactive --tty "${containerId}" bash
else
  echo "No Podman container with name: ${name} is running"
fi
