I want to write a simple script that simplifies the installation process of some software from standard repos, which runs on different distros.
For example,
on Redhat based distro, I would call
Code:
yum -y install package-name
on Debian based, It would be
Code:
apt-get -y install package-name
similar to Gentoo
Code:
emerge package-name
How can I archive this goal?
Which is the best way to detect the default package manager on specific distro and how?
Keep in mind that parameters of these package managers are different.
Any help would be appreciated.