From d2ffc770edd7a6050eaf46b9ce58e6745723930f Mon Sep 17 00:00:00 2001
From: Martin Pitt <martin@piware.de>
Date: Fri, 26 Oct 2018 09:05:25 +0200
Subject: [PATCH] mockspec: Allow changing chroot with $OS

---
 mockspec | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/mockspec b/mockspec
index 1e1831b..1a32eee 100755
--- a/mockspec
+++ b/mockspec
@@ -1,7 +1,8 @@
 #!/bin/sh
 # start mock session with build deps from given .spec file
+OS="${OS:-default}"
 set -eu
-[ -d "$(mock --print-root-path)" ] ||  mock --init
+[ -d "$(mock -r $OS --print-root-path)" ] ||  mock --init
 specfile="$1"
 shift
-mock -i $(sed -n '/^BuildRequires:/ {s/^.*: //; s/>=.*$//; s/%{.*}//; p}' "$specfile") $@
+mock -r $OS -i $(sed -n '/^BuildRequires:/ {s/^.*: //; s/>=.*$//; s/%{.*}//; p}' "$specfile") $@
-- 
2.39.5