From 15f1f07a7f45a811382f44a083d5ecd471010b25 Mon Sep 17 00:00:00 2001 From: Alexander Sulfrian Date: Wed, 14 Nov 2012 02:29:31 +0100 Subject: buildfile: add simple wrapper script for bcfg2-info buildfile buildfile uses the non-real repo to build a file for a host and hides most unnecessary output. It could be used for a preflight check of a custom genshi template. --- buildfile | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) create mode 100755 buildfile diff --git a/buildfile b/buildfile new file mode 100755 index 0000000..963d706 --- /dev/null +++ b/buildfile @@ -0,0 +1,20 @@ +#!/bin/sh + +. settings.sh +$(dirname $0)/prepare-repository + +verbose=0 +if [ "$1" = "-v" ]; then + verbose=1 + shift +fi + +bcfg2-info -Q "$REPO" buildfile "$@" | \ + if [ "$verbose" = "1" ]; then + awk '//{print}' + else + # only output lines between (excluding ) + awk '/<\/Path>/{p=0} /]*="[^"]*"\)*>//' + fi -- cgit v1.2.3-1-g7c22