forked from Plemya-x/ALR
		
	Исправление фильтрации пакетов в зависимости от дистрибутива.
This commit is contained in:
		@@ -98,13 +98,14 @@ if [ -z "$noPkgMgr" ]; then
 | 
			
		||||
  echo "$fileList"
 | 
			
		||||
 | 
			
		||||
if [ "$pkgMgr" == "pacman" ]; then
 | 
			
		||||
    latestFile=$(echo "$fileList" | grep -E 'alr-bin-.*.pkg.tar.zst' | sort -V | tail -n 1)
 | 
			
		||||
    latestFile=$(echo "$fileList" | grep -E 'alr-bin-.*\.pkg\.tar\.zst' | sort -V | tail -n 1)
 | 
			
		||||
elif [ "$pkgMgr" == "apt" ]; then
 | 
			
		||||
    latestFile=$(echo "$fileList" | grep -E 'alr-bin-.*.amd64.deb' | sort -V | tail -n 1)
 | 
			
		||||
    latestFile=$(echo "$fileList" | grep -E 'alr-bin-.*\.amd64\.deb' | sort -V | tail -n 1)
 | 
			
		||||
elif [ "$pkgMgr" == "apt-get" ]; then
 | 
			
		||||
    latestFile=$(echo "$fileList" | grep -E 'alr-bin-.*-alt[0-9]+\.x86_64\.rpm' | sort -V | tail -n 1)
 | 
			
		||||
elif [[ "$pkgMgr" == "dnf" || "$pkgMgr" == "yum" || "$pkgMgr" == "zypper" ]]; then
 | 
			
		||||
    latestFile=$(echo "$fileList" | grep -E 'alr-bin-.*\.x86_64\.rpm' | grep -v 'alt1' | sort -V | tail -n 1)
 | 
			
		||||
  elif [[ "$pkgMgr" == "apt-get"  ]]; then
 | 
			
		||||
    latestFile=$(echo "$fileList" | grep -E 'alr-bin-.*alt1.x86_64.rpm' | sort -V | tail -n 1)
 | 
			
		||||
    latestFile=$(echo "$fileList" | grep -E 'alr-bin-.*\.x86_64\.rpm' | sort -V | tail -n 1)
 | 
			
		||||
fi
 | 
			
		||||
 | 
			
		||||
  else
 | 
			
		||||
    error "Не поддерживаемый менеджер пакетов для автоматической установки"
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user