#!/bin/bash

set -x
self=`basename $0`

if [ x$1 = xinstall ]; then
    # Basic test phase
    mock --configdir=$PWD --root=mock --resultdir=./mock -v --install nano lcov psmisc sudo valgrind ./mock/*.rpm
elif [ x$1 = xdownloads ]; then
    # Extra test phase
    mock --configdir=$PWD --root=mock --resultdir=./mock -v --install ./downloads/*.rpm nano sudo valgrind lcov
    
elif [ x$1 = xlint ]; then
    rpmlint -i -f rpmlintrc ./mock/*.rpm
else
    echo "Unknown sub-command: $1"
    exit 1
fi
