Commit 5bdc3532 authored by Vitaly Lipatov's avatar Vitaly Lipatov

add get_pkgname_from_filename, test for it, use it

parent 8c4b2fec
......@@ -246,12 +246,13 @@ if [ -n "$CHECKONLINE" ] ; then
fi
if [ -n "$GIRAR_USER" ] ; then
GITURL="http://git.altlinux.org/people/$GIRAR_USER/packages/${SRCRPM/-*/}.git"
GITURL="http://git.altlinux.org/people/$GIRAR_USER/packages/$(get_pkgname_from_filename $SRCRPM).git"
if GET -d $GITURL ; then
echog "Published at $GITURL by $GIRAR_USER"
else
echog "There is no git repo $GITURL"
fi
ssh $GIRARHOST find-package $(get_pkgname_from_filename $SRCRPM)
fi
RET="MISSED"
for i in $REPOSITORY ; do
......
......@@ -63,6 +63,12 @@ build_rpms_name()
build_buildroot
}
# pkg-source-1.0.src.rpm -> pkg-source
get_pkgname_from_filename()
{
echo ${1/-[0-9]*/}
}
# build binary package list (1st - repo dir, 2st - pkgname)
# algorithm: list all files in PKGDIR, print packages with our source pkg name
......
#!/bin/sh
. `dirname $0`/../share/eterbuild/functions/common
load_mod spec rpm
check()
{
[ "$2" != "$3" ] && echo "FATAL with '$1': result '$2' do not match with '$3'" || echo "OK for '$1' with '$2'"
}
check_pkg()
{
check "$1" $(get_pkgname_from_filename "$1") "$2"
}
check_pkg pkg-1.0.spec pkg
check_pkg pkg-source-1.0.spec pkg-source
check_pkg pkg-source-less-1.0.spec pkg-source-less
check_pkg pkg123-1.0.spec pkg123
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