]> piware.de Git - bin.git/blob - mockspec
build-devmock: Fix ssh
[bin.git] / mockspec
1 #!/bin/sh
2 # start mock session with build deps from given .spec file
3 OS="${OS:-default}"
4 set -eu
5 [ -d "$(mock -r $OS --print-root-path)" ] ||  mock -r $OS --init
6 specfile="$1"
7 shift
8 mock -r $OS -i $(sed -n '/^BuildRequires:/ {s/^.*: //; s/>=.*$//; s/%{.*}//; p}' "$specfile") $@