aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rwxr-xr-xrebuild_perl_iurt9
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 $*; }