From 08b3e5cdeb5bfea9566bdefc843aff27a6825c77 Mon Sep 17 00:00:00 2001 From: Pascal Terjan Date: Thu, 20 Jul 2017 22:49:58 +0100 Subject: Use given repository, and fail if chroot can not be created --- rebuild_perl_iurt | 9 +++++++-- 1 file 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 $*; } -- cgit v1.2.1