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