Skip to content

Commit

Permalink
epm play: nekoray: fix version troubles
Browse files Browse the repository at this point in the history
Изменения в play: исправлено скачивание beta версии, вместо стабильной
Изменения в repack: добавлена поддержка версии 4.0, где в некоторых
местах nekoray поменялся на nekobox (спасибо им за головную боль)
  • Loading branch information
pechenovv authored and vitlav committed Sep 14, 2024
1 parent cfce082 commit 2062db2
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 3 deletions.
5 changes: 5 additions & 0 deletions play.d/nekoray.sh
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,11 @@ URL="https://github.com/MatsuriDayo/nekoray"
arch=x64
pkgtype=deb


if [ "$VERSION" = "*" ] ; then
VERSION="$(eget -O- https://api.github.com/repos/MatsuriDayo/nekoray/releases/latest | grep -oP '"tag_name": "\K(.*?)(?=")' | sed 's/v//g')"
fi

PKGURL=$(eget --list --latest https://github.com/MatsuriDayo/nekoray/releases "nekoray-$VERSION-*-debian-$arch.$pkgtype")

install_pkgurl
Expand Down
10 changes: 7 additions & 3 deletions repack.d/nekoray.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,12 @@
# It will be run with two args: buildroot spec
BUILDROOT="$1"
SPEC="$2"

PRODUCT=nekoray
if [ -f $BUILDROOT/opt/nekoray/nekoray ]
then
PRODUCT=nekoray
else
PRODUCT=nekobox
fi
PRODUCTDIR=/opt/nekoray

. $(dirname $0)/common.sh
Expand All @@ -18,7 +22,7 @@ cat <<EOF |create_file /usr/share/applications/$PRODUCT.desktop
Name=Nekoray
Comment=Qt based cross-platform GUI proxy configuration manager (backend: Xray / sing-box)
Exec=$PRODUCT -- %u -appdata
Icon=/opt/nekoray/nekoray.png
Icon=/opt/$PRODUCT/$PRODUCT.png
Type=Application
Terminal=false
Categories=Network;
Expand Down

0 comments on commit 2062db2

Please sign in to comment.