Commit e434fd9a authored by Vitaly Lipatov's avatar Vitaly Lipatov

get_pkgname_from_filename: add support for full path to filename

parent 9c945af0
...@@ -106,9 +106,11 @@ spec_by_srpm() ...@@ -106,9 +106,11 @@ spec_by_srpm()
} }
# pkg-source-1.0.src.rpm -> pkg-source # pkg-source-1.0.src.rpm -> pkg-source
# pkg-source_1.0.src.rpm -> pkg-source
get_pkgname_from_filename() get_pkgname_from_filename()
{ {
echo ${1/-[0-9]*/} local FN=$(basename $1)
echo ${FN/[-_][0-9]*/}
} }
# return source package name by binary rpm package file # return source package name by binary rpm package file
......
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