aboutsummaryrefslogtreecommitdiffstats
path: root/rebuild_perl_iurt
diff options
context:
space:
mode:
authorPascal Terjan <pterjan@mageia.org>2017-07-20 22:49:58 +0100
committerPascal Terjan <pterjan@mageia.org>2017-07-20 22:49:58 +0100
commit08b3e5cdeb5bfea9566bdefc843aff27a6825c77 (patch)
tree731dc1910490c657abaa2772fa63e5f4972b1110 /rebuild_perl_iurt
parent81fc6a8d56fd295442e3e2a2f5dee2f4c468e3d9 (diff)
downloadiurt-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-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 $*; }