Commit 6576fb4e authored by Vitaly Lipatov's avatar Vitaly Lipatov

rpmgp: fix src.rpm import, allow to use several files

parent 02b967ad
...@@ -236,9 +236,15 @@ fi ...@@ -236,9 +236,15 @@ fi
if [ -n "$MIGRATEGEAR" ] ; then if [ -n "$MIGRATEGEAR" ] ; then
parse_cmd_pre "$@" parse_cmd_pre "$@"
pack_src_rpm $LISTRPMARGS for INFILE in $LISTNAMES ; do
for PKGNAME in $LISTBUILT ; do # call for each file due generated BASENAME
echo "Create gear repo" LISTNAMES=$INFILE pack_src_rpm $INFILE $LISTRPMARGS
PKGNAME="$LISTBUILT"
if [ -z "$BASENAME" ] ; then
echo "Can't get basename for $PKGNAME, skipping"
continue
fi
echo "Create gear repo $BASENAME from $PKGNAME"
GITALT=~/Projects/git-alt GITALT=~/Projects/git-alt
GEARDIR=$GITALT/$BASENAME GEARDIR=$GITALT/$BASENAME
test -d "$GEARDIR" && fatal "repo $GEARDIR already exits" test -d "$GEARDIR" && fatal "repo $GEARDIR already exits"
...@@ -246,7 +252,8 @@ if [ -n "$MIGRATEGEAR" ] ; then ...@@ -246,7 +252,8 @@ if [ -n "$MIGRATEGEAR" ] ; then
cd $GEARDIR || fatal "can't cd to $GEARDIR" cd $GEARDIR || fatal "can't cd to $GEARDIR"
git init-db || fatal "can't init db" git init-db || fatal "can't init db"
gear-srpmimport $PKGNAME || fatal "can't import srpm $PKGNAME" gear-srpmimport $PKGNAME || fatal "can't import srpm $PKGNAME"
rm -vf $PKGNAME # remove src.rpm only if it was generated
[ -z ${INFILE/*rpm/} ] || rm -vf $PKGNAME
done done
exit 0 exit 0
fi 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