#!/bin/sh
echo "Welcom Podman and/or Docker Installer"
while true
do
	echo -n "Do you install Podman1.6.4"
	echo -n "? [y/n] (yes) "
	read answer
	if [ ! "$answer" ]
	then
		answer="y"
	fi
	case "$answer" in
		(y|Y|yes|Yes|YES)
		PODMAN="yes"
		break
		;;
		(n|N|no|No|NO)
		PODMAN="no"
		break
		;;
	esac
done
while true
do
	echo -n "Do you install DockerCE.19.03"
	echo -n "? [y/n] (yes) "
	read answer
	if [ ! "$answer" ]
	then
		answer="y"
	fi
	case "$answer" in
		(y|Y|yes|Yes|YES)
		DOCKER="yes"
		break
		;;
		(n|N|no|No|NO)
		DOCKER="no"
		break
		;;
	esac
done
if [ "$PODMAN" == "yes" ]
then
	cd Podman1.6.4;./install
	if [ "$DOCKER" == "no" ]
	then
		rpm -ivh podman-docker-1.6.4-10.module_el8.2.0+305+5e198a41.noarch.rpm
	fi
	cd ..
fi
if [ "$DOCKER" == "yes" ]
then
	cd DockerCE.19.03;./install;cd ..
fi
exit 0;
