[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

[Libguestfs] [PATCH 2/3] Create manpage atomically.



-- 
Richard Jones, Emerging Technologies, Red Hat  http://et.redhat.com/~rjones
virt-p2v converts physical machines to virtual machines.  Boot with a
live CD or over the network (PXE) and turn machines into Xen guests.
http://et.redhat.com/~rjones/virt-p2v
>From 9adddc19e448781cf2076c44f66242fe48b47c7c Mon Sep 17 00:00:00 2001
From: Richard Jones <rjones trick home annexia org>
Date: Wed, 23 Sep 2009 12:05:55 +0100
Subject: [PATCH 2/3] Create manpage atomically.

Don't fail with a partial file if disk full, etc.
---
 cat/Makefile.am       |    2 +-
 df/Makefile.am        |    2 +-
 edit/Makefile.am      |    2 +-
 inspector/Makefile.am |    2 +-
 rescue/Makefile.am    |    2 +-
 5 files changed, 5 insertions(+), 5 deletions(-)

diff --git a/cat/Makefile.am b/cat/Makefile.am
index 98df337..5fe320b 100644
--- a/cat/Makefile.am
+++ b/cat/Makefile.am
@@ -30,7 +30,7 @@ virt-cat.1: virt-cat.pl
 	  --section 1 \
 	  -c "Virtualization Support" \
 	  --release "$(PACKAGE_NAME)-$(PACKAGE_VERSION)" \
-	  $< > $@
+	  $< > $ -t && mv $ -t $@
 
 $(top_builddir)/html/virt-cat.1.html: virt-cat.pl
 	mkdir -p $(top_builddir)/html
diff --git a/df/Makefile.am b/df/Makefile.am
index 7234eb7..08af772 100644
--- a/df/Makefile.am
+++ b/df/Makefile.am
@@ -30,7 +30,7 @@ virt-df.1: virt-df.pl
 	  --section 1 \
 	  -c "Virtualization Support" \
 	  --release "$(PACKAGE_NAME)-$(PACKAGE_VERSION)" \
-	  $< > $@
+	  $< > $ -t && mv $ -t $@
 
 $(top_builddir)/html/virt-df.1.html: virt-df.pl
 	mkdir -p $(top_builddir)/html
diff --git a/edit/Makefile.am b/edit/Makefile.am
index 4a2a52c..df8ddb7 100644
--- a/edit/Makefile.am
+++ b/edit/Makefile.am
@@ -30,7 +30,7 @@ virt-edit.1: virt-edit.pl
 	  --section 1 \
 	  -c "Virtualization Support" \
 	  --release "$(PACKAGE_NAME)-$(PACKAGE_VERSION)" \
-	  $< > $@
+	  $< > $ -t && mv $ -t $@
 
 $(top_builddir)/html/virt-edit.1.html: virt-edit.pl
 	mkdir -p $(top_builddir)/html
diff --git a/inspector/Makefile.am b/inspector/Makefile.am
index a93a1ff..6eb3b57 100644
--- a/inspector/Makefile.am
+++ b/inspector/Makefile.am
@@ -30,7 +30,7 @@ virt-inspector.1: virt-inspector.pl
 	  --section 1 \
 	  -c "Virtualization Support" \
 	  --release "$(PACKAGE_NAME)-$(PACKAGE_VERSION)" \
-	  $< > $@
+	  $< > $ -t && mv $ -t $@
 
 $(top_builddir)/html/virt-inspector.1.html: virt-inspector.pl
 	mkdir -p $(top_builddir)/html
diff --git a/rescue/Makefile.am b/rescue/Makefile.am
index 3d55728..1067c8d 100644
--- a/rescue/Makefile.am
+++ b/rescue/Makefile.am
@@ -30,7 +30,7 @@ virt-rescue.1: virt-rescue.pl
 	  --section 1 \
 	  -c "Virtualization Support" \
 	  --release "$(PACKAGE_NAME)-$(PACKAGE_VERSION)" \
-	  $< > $@
+	  $< > $ -t && mv $ -t $@
 
 $(top_builddir)/html/virt-rescue.1.html: virt-rescue.pl
 	mkdir -p $(top_builddir)/html
-- 
1.6.2.5


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]