#!/bin/bash

set -eux

basedir=$1
specdir=${basedir}/openstack/

WORKSPACE=${WORKSPACE:-$basedir}

echo "run renderspec over specfiles from ${specdir}"
for spec in ${specdir}/**/*.spec.j2; do
    mkdir -p $WORKSPACE/logs/
    for specstyle in "suse" "fedora"; do
        echo "run ${spec} for ${specstyle}"
        renderspec --spec-style ${specstyle} ${spec} \
                   -o $WORKSPACE/logs/${spec##*/}.${specstyle}
    done
done

#!/bin/bash

set -eux

basedir=$1
specdir=${basedir}/openstack/

WORKSPACE=${WORKSPACE:-$basedir}
OUTPUTDIR=$WORKSPACE/logs/
specstyles="suse fedora"

mkdir -p $OUTPUTDIR

# clean up output dir
for specstyle in $specstyles; do
    rm -f $OUTPUTDIR/*.${specstyle}
done

echo "run renderspec over specfiles from ${specdir}"
for spec in ${specdir}/**/*.spec.j2; do
    for specstyle in $specstyles; do
        echo "run ${spec} for ${specstyle}"
        renderspec --spec-style ${specstyle} ${spec} \
                   -o $WORKSPACE/logs/${spec##*/}.${specstyle}
    done
done

Clean up output dir before creating new renderspecs
Clean up output dir before creating new renderspecs

This avoids left-over files from previous runs affecting
the test results

Change-Id: I30fe43a9b406321550132267acf25801e15d1178
