Added option to remove part of the version number

This commit is contained in:
Krizsán Péter 2024-10-08 18:55:51 +02:00
parent a53f161b85
commit 82ca4c3c3d
2 changed files with 5 additions and 2 deletions

View File

@ -3,7 +3,7 @@
# Add libtorrent-rasterbar
cp -fv networking/netlibs/libtorrent-rasterbar.xml ../blfs_root/blfs-xml/networking/netlibs
grep -qF libtorrent-rasterbar.xml ../blfs_root/blfs-xml/networking/netlibs/netlibs.xml || sed -i '/<\/chapter>.*/i <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="libtorrent-rasterbar.xml"/>' ../blfs_root/blfs-xml/networking/netlibs/netlibs.xml
grep -qF libtorrent-rasterbar-version ../blfs_root/blfs-xml/packages.ent || echo '<!ENTITY libtorrent-rasterbar-version "v2.0.10">' >> ../blfs_root/blfs-xml/packages.ent
grep -qF libtorrent-rasterbar-version ../blfs_root/blfs-xml/packages.ent || echo '<!ENTITY libtorrent-rasterbar-version "2.0.10">' >> ../blfs_root/blfs-xml/packages.ent
# Add qBittorrent
cp -fv xsoft/other/qbittorrent.xml ../blfs_root/blfs-xml/xsoft/other

View File

@ -11,6 +11,9 @@ getLatestGithubRelease()
URL="https://github.com`curl -v --silent $URL 2>&1 | grep '<a href=' | grep '.tar.' -m1 | tr '"' '\n' | grep /releases/`"
sed -i -E "s@($2-download-http \"+)(.+\">)@\1$URL\">@" ./$3/$2.xml
VER=`echo $URL | awk -F/ '{ print $(NF-1) }' | awk -F- '{ print $NF }'`
if [[ $4 ]]; then
VER=`echo $VER | cut -c$4`
fi
sed -i -E "s@($2-version \"+)(.+\">)@\1$VER\">@" add_packages.sh
echo "Latest version: $VER"
printf "Found package: $URL\n"
@ -48,7 +51,7 @@ LATEST_VERSION="${LATEST_VERSION%.tar.xz}"
sed -i -E "s@(qbittorrent-version \"+)(.+\">)@\1$LATEST_VERSION\">@" add_packages.sh
#libtorrent-rasterbar
getLatestGithubRelease arvidn/libtorrent libtorrent-rasterbar networking/netlibs
getLatestGithubRelease arvidn/libtorrent libtorrent-rasterbar networking/netlibs 2-
#SDL2-image
getLatestGithubRelease libsdl-org/SDL_image sdl2-image general/graphlib