Commit f3219f39 authored by Vitaly Lipatov's avatar Vitaly Lipatov

copying tarball to tarball dir if exists

parent 84290e65
......@@ -118,6 +118,17 @@ check_gear_and_tag()
fi
}
extract_tarball_to_dest()
{
local TDIR=$(mktemp -d || fatal "can't create tmp dir")
cd $TDIR
cat "$1" | rpm2cpio | cpio -i "*.tar*"
cp -fv *.tar* $2
cd -
rm -f $TDIR/*
rmdir $TDIR
}
rpmbs_copying_built()
{
if [ -n "$ETERDESTSRPM" ] ; then
......@@ -127,6 +138,13 @@ rpmbs_copying_built()
else
mkdir -p $ETERDESTSRPM || echog "Error mkdir $ETERDESTSRPM"
cp -fv $LISTBUILT $ETERDESTSRPM || echog "Error during copying"
# Publish tarball if target dir is exist
if [ -d "$ETERDESTSRPM/tarball" ] ; then
for i in $LISTBUILT ; do
extract_tarball_to_dest $i $ETERDESTSRPM/tarball
done
fi
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