From a71e59d04fdfb34034e16ce7ccf10c1728a4b8b5 Mon Sep 17 00:00:00 2001 From: Martin Pitt Date: Wed, 11 Jan 2017 11:18:10 +0100 Subject: [PATCH] Add mockspec: start mock session with build deps from given .spec file --- mockspec | 7 +++++++ 1 file changed, 7 insertions(+) create mode 100755 mockspec diff --git a/mockspec b/mockspec new file mode 100755 index 0000000..5308a37 --- /dev/null +++ b/mockspec @@ -0,0 +1,7 @@ +#!/bin/sh +# start mock session with build deps from given .spec file +set -eu +[ -d "$(mock --print-root-path)" ] || mock --init +specfile="$1" +shift +mock -i $(sed -n '/^BuildRequires:/ {s/^.*: //; s/>=.*$//; p}' "$specfile") $@ -- 2.39.5