X-Git-Url: https://piware.de/gitweb/?p=bin.git;a=blobdiff_plain;f=mockspec;h=6f32dbca09afe7773d17a49d06a208fc1baab45e;hp=5308a377ce0426564c61fc7dff7950019bcf6013;hb=67fe3081fb8bb929ce5c9927286f23eb1fd0099e;hpb=2d5412cce315910af75921292ffd522d41723d06 diff --git a/mockspec b/mockspec index 5308a37..6f32dbc 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 -r $OS --init specfile="$1" shift -mock -i $(sed -n '/^BuildRequires:/ {s/^.*: //; s/>=.*$//; p}' "$specfile") $@ +mock -r $OS -i $(sed -n '/^BuildRequires:/ {s/^.*: //; s/>=.*$//; s/%{.*}//; p}' "$specfile") $@