Commit 255c64d2 authored by Vitaly Lipatov's avatar Vitaly Lipatov

epm-repack: fix version parsing

parent 21961a92
......@@ -196,8 +196,13 @@ EOF
__set_version_pkgname()
{
local alpkg="$1"
VERSION="$(echo "$alpkg" | grep -o -P "[-_.]([0-9])([0-9])*(\.[0-9])*" | head -n1 | sed -e 's|^[-_.]||')" #"
VERSION="$(echo "$alpkg" | grep -o -P '[-_.][0-9][0-9]*([.]*[0-9])*' | head -n1 | sed -e 's|^[-_.]||')" #"
[ -n "$VERSION" ] && PKGNAME="$(echo "$alpkg" | sed -e "s|[-_.]$VERSION.*||")"
# set version as all between name and extension
#local woext="$(echo "alpkg" | sed -e 's|\.tar.*||')"
#if [ "$woext" != "$alpkg" ] ; then
# VERSION="$(echo "$woext" " | sed -e "s|^$PKGNAME[-_.]||")"
#fi
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment