From e23a7222fd322cc8cd5f051b76b482a3826073a1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=D0=95=D0=B2=D0=B3=D0=B5=D0=BD=D0=B8=D0=B9=20=D0=A5=D1=80?= =?UTF-8?q?=D0=B0=D0=BC=D0=BE=D0=B2?= Date: Sat, 10 Aug 2024 12:16:40 +0300 Subject: [PATCH] =?UTF-8?q?=D0=BE=D0=B1=D0=BD=D0=BE=D0=B2=D0=BB=D0=B5?= =?UTF-8?q?=D0=BD=D0=B8=D0=B5=20=D0=BF=D1=83=D1=82=D0=B8=20=D1=81=20=D0=BF?= =?UTF-8?q?=D0=B0=D0=BA=D0=B5=D1=82=D0=B0=D0=BC=D0=B8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- scripts/install.sh | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/scripts/install.sh b/scripts/install.sh index 527214e..bd9a5e2 100755 --- a/scripts/install.sh +++ b/scripts/install.sh @@ -65,19 +65,19 @@ else fi if [ -z "$noPkgMgr" ]; then - info "Получение списка файлов с https://plemya-x.ru/alr/" - pageContent=$(curl -s https://plemya-x.ru/) - echo "Полученное содержимое страницы:" - echo "$pageContent" + info "Получение списка файлов с https://plemya-x.ru/" + pageContent=$(curl -s https://plemya-x.ru/?dir=alr) + + # Извлечение списка файлов из HTML + fileList=$(echo "$pageContent" | grep -oP '(?<=href=").*?(?=")' | grep -E 'alr-bin-.*.(pkg.tar.zst|rpm|deb)') - fileList=$(echo "$pageContent" | grep -oE "href='([^'#]+)'" | cut -d"'" -f2) echo "Полученный список файлов:" echo "$fileList" if [ "$pkgMgr" == "pacman" ]; then 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" == "dnf" || "$pkgMgr" == "yum" || "$pkgMgr" == "zypper" ]]; then latestFile=$(echo "$fileList" | grep -E 'alr-bin-.*.x86_64.rpm' | sort -V | tail -n 1) else