2024-04-06 12:41:38 +00:00
|
|
|
#!/bin/bash
|
|
|
|
|
|
|
|
readonly CMD=$(basename "${0}")
|
|
|
|
|
|
|
|
function usage() {
|
|
|
|
echo
|
|
|
|
echo "usage: ${CMD} [fedora|debian]"
|
|
|
|
echo
|
|
|
|
exit 1
|
|
|
|
}
|
|
|
|
|
|
|
|
if [ $# -lt 1 ]; then
|
|
|
|
usage
|
|
|
|
exit 0;
|
|
|
|
fi
|
|
|
|
|
|
|
|
case "${1}" in
|
|
|
|
fedora)
|
|
|
|
NAME="f40"
|
|
|
|
IMAGE="fedora-thrrgilag:40"
|
|
|
|
BUILDFILE="Containerfile.fedora-distrobox";;
|
|
|
|
debian)
|
|
|
|
NAME="debian-bookworm"
|
|
|
|
IMAGE="debian-thrrgilag:bookworm"
|
|
|
|
BUILDFILE="Containerfile.debian-distrobox";;
|
|
|
|
*)
|
|
|
|
usage
|
|
|
|
exit 0;;
|
|
|
|
esac
|
|
|
|
|
|
|
|
podman build -t "${IMAGE}" -f "${BUILDFILE}"
|
2024-04-06 13:45:54 +00:00
|
|
|
distrobox create --name "${NAME}" --home "${HOME}/h/${NAME}" -i "localhost/${IMAGE}"
|