From: Martin Pitt Date: Sun, 28 Oct 2018 12:01:15 +0000 (+0100) Subject: mockspec: Fix mock --init for non-default $OS X-Git-Url: https://piware.de/gitweb/?p=bin.git;a=commitdiff_plain;h=c838f500ed0eb0e835e00bdf23c5b7d6341e00e8;hp=4e0fe5d8a00af60efa1a2ff8e7125245c8d54608 mockspec: Fix mock --init for non-default $OS --- diff --git a/mockspec b/mockspec index 1a32eee..6f32dbc 100755 --- a/mockspec +++ b/mockspec @@ -2,7 +2,7 @@ # start mock session with build deps from given .spec file OS="${OS:-default}" set -eu -[ -d "$(mock -r $OS --print-root-path)" ] || mock --init +[ -d "$(mock -r $OS --print-root-path)" ] || mock -r $OS --init specfile="$1" shift mock -r $OS -i $(sed -n '/^BuildRequires:/ {s/^.*: //; s/>=.*$//; s/%{.*}//; p}' "$specfile") $@