Commit e47e0cf1 authored by Vitaly Lipatov's avatar Vitaly Lipatov

rpmgs: only original tarball only if converted

parent 25883158
...@@ -56,8 +56,11 @@ LISTRPMARGS=$@ ...@@ -56,8 +56,11 @@ LISTRPMARGS=$@
repack_tarball() repack_tarball()
{ {
# TODO: move it into repack
[ "$(realpath "$1")" = "$(realpath "$2")" ] && return [ "$(realpath "$1")" = "$(realpath "$2")" ] && return
docmd erc -f repack "$1" "$2" docmd erc -f repack "$1" "$2"
# remove original
rm -f "$1"
} }
check_tarball() check_tarball()
...@@ -76,7 +79,7 @@ download_to() ...@@ -76,7 +79,7 @@ download_to()
download_url "$URL" && repack_tarball "$DF" "$TARGET" download_url "$URL" && repack_tarball "$DF" "$TARGET"
local RET=$? local RET=$?
# TODO: repack need remove origin # TODO: repack need remove origin
rm -fv "$DF" #rm -fv "$DF"
[ "$RET" = "0" ] || rm -fv "$DF" "$TARGET" [ "$RET" = "0" ] || rm -fv "$DF" "$TARGET"
popd popd
return $RET return $RET
......
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