X-Git-Url: https://git.jankratochvil.net/?p=massrebuild.git;a=blobdiff_plain;f=unpackone;fp=unpackone;h=2530331e8a9414e24ca7e49dcaf13de3d326d3a7;hp=0000000000000000000000000000000000000000;hb=2c33c1307fd2902092d469ff172f8dc1aa7a89fe;hpb=f6d5155e95a7ede820d77243e380b155bdd33f27 diff --git a/unpackone b/unpackone new file mode 100755 index 0000000..2530331 --- /dev/null +++ b/unpackone @@ -0,0 +1,27 @@ +#! /bin/bash +set -ex +repos=$1 +shift +d=$1 +shift +t=/tmp/unpack.$$ +rm -rf $t +mkdir $t +cd $t +if ! dnf --disablerepo='*' --enablerepo=$repos download $@;then + echo $@ >>$d/error-dnf + exit 1 +fi +for pkg in "$@";do + cd $t + if ! test -e $pkg.rpm;then + echo $pkg >>$d/error-e + continue + fi + rpm2archive $pkg.rpm + rm -f $pkg.rpm + cd $d + tar xzf $t/$pkg.rpm.tgz + rm -f $../pkg.rpm.tgz +done +rm -rf $t