diff options
author | Pascal Terjan <pterjan@mageia.org> | 2017-07-20 22:49:58 +0100 |
---|---|---|
committer | Pascal Terjan <pterjan@mageia.org> | 2017-07-20 22:49:58 +0100 |
commit | 08b3e5cdeb5bfea9566bdefc843aff27a6825c77 (patch) | |
tree | 731dc1910490c657abaa2772fa63e5f4972b1110 /rebuild_perl_iurt | |
parent | 81fc6a8d56fd295442e3e2a2f5dee2f4c468e3d9 (diff) | |
download | iurt-08b3e5cdeb5bfea9566bdefc843aff27a6825c77.tar iurt-08b3e5cdeb5bfea9566bdefc843aff27a6825c77.tar.gz iurt-08b3e5cdeb5bfea9566bdefc843aff27a6825c77.tar.bz2 iurt-08b3e5cdeb5bfea9566bdefc843aff27a6825c77.tar.xz iurt-08b3e5cdeb5bfea9566bdefc843aff27a6825c77.zip |
Use given repository, and fail if chroot can not be created
Diffstat (limited to 'rebuild_perl_iurt')
-rwxr-xr-x | rebuild_perl_iurt | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/rebuild_perl_iurt b/rebuild_perl_iurt index 0cc5fe5..639af57 100755 --- a/rebuild_perl_iurt +++ b/rebuild_perl_iurt @@ -14,10 +14,15 @@ media=core/release repository=http://repository.mageia.org/distrib/ if [ -z "$perlchroot" ]; then - perlchroot=$(echo | iurt --shell -r $distro $arch 2>&1 | perl -lne '/dumping to a chrooted shell into (.*)/ and print $1') + perlchroot=$(echo | iurt --repository $repository --shell -r $distro $arch 2>&1 | perl -lne '/dumping to a chrooted shell into (.*)/ and print $1') fi -iurt --shell -r $distro $arch --use-old-chroot $perlchroot --chrooted-urpmi -m $media -- $repository <<"EOF" +if [ -z "$perlchroot" ]; then + echo "No chroot given to reuse and failed to create a new one" + exit 1 +fi + +iurt --repository $repository --shell -r $distro $arch --use-old-chroot $perlchroot --chrooted-urpmi -m $media -- $repository <<"EOF" set -x set -e skip() { echo $*; } |