newapkbuild: allow for underscore version separator
This commit is contained in:
parent
b224407821
commit
e261a84f2d
|
@ -208,7 +208,7 @@ __EOF__
|
||||||
# Create new aport from templates
|
# Create new aport from templates
|
||||||
newaport() {
|
newaport() {
|
||||||
local newname="${1##*/}"
|
local newname="${1##*/}"
|
||||||
local pn=${newname%-[0-9]*}
|
local pn=${newname%[-_][0-9]*}
|
||||||
local pv
|
local pv
|
||||||
local source=
|
local source=
|
||||||
is_url "$1" && source="$1"
|
is_url "$1" && source="$1"
|
||||||
|
@ -222,7 +222,7 @@ newaport() {
|
||||||
pv=${pv#*[a-z]}
|
pv=${pv#*[a-z]}
|
||||||
source="${source%.t*}/$pkgname-$pv.tar.gz"
|
source="${source%.t*}/$pkgname-$pv.tar.gz"
|
||||||
elif [ "$pn" != "$newname" ]; then
|
elif [ "$pn" != "$newname" ]; then
|
||||||
pv=${newname#$pn-}
|
pv=${newname#$pn[-_]}
|
||||||
pv=${pv%.t*} #strip .tar.gz .tgz .tar.bz2 etc
|
pv=${pv%.t*} #strip .tar.gz .tgz .tar.bz2 etc
|
||||||
fi
|
fi
|
||||||
if [ -z "$pkgname" ]; then
|
if [ -z "$pkgname" ]; then
|
||||||
|
|
Loading…
Reference in New Issue