rpm-packaging/tools/run_renderspec.sh
Haikel Guemar 220bb64df0 Tooling: set default behaviour
Tools will run on current directory if no input is given.
Add tools/README.rst for brief documentation

Change-Id: Id8c68c12191591d70ae22293b0b99048998fb1a4
2016-07-07 20:43:40 +02:00

27 lines
583 B
Bash
Executable File

#!/bin/bash
set -eux
basedir=${1:-$PWD}
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