[Libguestfs] [PATCH] test-data: use make functions to get the prepared disk name

Richard W.M. Jones rjones at redhat.com
Fri Jan 22 12:55:16 UTC 2016


On Fri, Jan 22, 2016 at 01:24:26PM +0100, Pino Toscano wrote:
> Avoid a cat+sed for getting the prepared disk name, using a make
> function instead.
> ---
>  test-data/phony-guests/Makefile.am | 3 +--
>  1 file changed, 1 insertion(+), 2 deletions(-)
> 
> diff --git a/test-data/phony-guests/Makefile.am b/test-data/phony-guests/Makefile.am
> index 5a56960..9fac2d0 100644
> --- a/test-data/phony-guests/Makefile.am
> +++ b/test-data/phony-guests/Makefile.am
> @@ -70,8 +70,7 @@ CLEANFILES = \
>  # virt-alignment-scan don't break when they encounter them.
>  blank-%.img:
>  	rm -f $@ $@-t
> -	$(top_builddir)/run guestfish \
> -	    -N $@-t="$$(echo $@ | $(SED) -e 's/blank-//' -e 's/.img//')" exit
> +	$(top_builddir)/run guestfish -N $@-t="$(patsubst blank-%.img,%,$@)" exit
>  	mv $@-t $@

ACK, although for spurious reasons automake tends to complain about
use of GNU make extensions.

Rich.

-- 
Richard Jones, Virtualization Group, Red Hat http://people.redhat.com/~rjones
Read my programming and virtualization blog: http://rwmj.wordpress.com
virt-top is 'top' for virtual machines.  Tiny program with many
powerful monitoring features, net stats, disk stats, logging, etc.
http://people.redhat.com/~rjones/virt-top




More information about the Libguestfs mailing list