modified osInfo

This commit is contained in:
Maksymilian Potok 2021-01-28 12:39:20 +01:00
부모 38cc6c74a0
커밋 4059521039
1개의 변경된 파일8개의 추가작업 그리고 5개의 파일을 삭제

파일 보기

@ -21,15 +21,18 @@ function package_installed() {
exit 5 exit 5
else else
declare -A osInfo; declare -A osInfo;
osInfo[/etc/redhat-release]=yum upgrade && yum install osInfo[/etc/redhat-release]=yum
osInfo[/etc/arch-release]=pacman -Syu && pacman -S osInfo[/etc/SuSE-release]=zypper
osInfo[/etc/SuSE-release]=zypper update && zypper install osInfo[/etc/debian_version]=apt-get
osInfo[/etc/debian_version]=apt-get update && apt-get install
for f in ${!osInfo[@]} for f in ${!osInfo[@]}
do do
if [[ -f $f ]];then if [[ -f $f ]];then
sudo ${osInfo[$f]} $1 sudo ${osInfo[$f]} update
sudo ${osInfo[$f]} install $1
else
sudo pacman -Syu
sudo pacman -S $1
fi fi
done done
fi fi