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

Pino Toscano ptoscano at redhat.com
Fri Jan 22 12:24:26 UTC 2016


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 $@
 
 # Make a (dummy) Fedora image.
-- 
2.5.0




More information about the Libguestfs mailing list