mirror of
git://git.proxmox.com/git/novnc-pve.git
synced 2025-01-03 05:17:56 +03:00
buildsys: generate build-directory atomically
Use an intermediate directory and only rename it to the actual build directory if preparation succeeded, this way some odd failure/interrupt cannot result in a bad build, which could be, unlikely but not impossible, broken in subtle ways. Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
This commit is contained in:
parent
ba0b621756
commit
f2d36e2f3e
9
Makefile
9
Makefile
@ -15,10 +15,11 @@ all:
|
|||||||
|
|
||||||
$(SRCDIR)/vnc.html: submodule
|
$(SRCDIR)/vnc.html: submodule
|
||||||
$(BUILDDIR): $(SRCDIR)/vnc.html
|
$(BUILDDIR): $(SRCDIR)/vnc.html
|
||||||
rm -rf $(BUILDDIR)
|
rm -rf $@ $@.tmp
|
||||||
cp -rpa $(SRCDIR) $(BUILDDIR)
|
cp -rpa $(SRCDIR) $@.tmp
|
||||||
cp -a debian $(BUILDDIR)
|
cp -a debian $@.tmp/
|
||||||
echo "git clone git://git.proxmox.com/git/novnc-pve.git\\ngit checkout $(GITVERSION)" > $(BUILDDIR)/debian/SOURCE
|
echo "git clone git://git.proxmox.com/git/novnc-pve.git\\ngit checkout $(GITVERSION)" > $@.tmp/debian/SOURCE
|
||||||
|
mv $@.tmp $@
|
||||||
|
|
||||||
.PHONY: deb
|
.PHONY: deb
|
||||||
deb: $(DEB)
|
deb: $(DEB)
|
||||||
|
Loading…
Reference in New Issue
Block a user