[Lsb-messages] /var/www/bzr/lsb/devel/specdb r1289: On restore, don't actually copy things unless DO_COPY is set.
Jeff Licquia
licquia at linuxfoundation.org
Sat Feb 23 16:03:05 UTC 2013
------------------------------------------------------------
revno: 1289
committer: Jeff Licquia <licquia at linuxfoundation.org>
branch nick: specdb
timestamp: Sat 2013-02-23 11:03:05 -0500
message:
On restore, don't actually copy things unless DO_COPY is set.
modified:
makefile
-------------- next part --------------
=== modified file 'makefile'
--- a/makefile 2013-02-23 14:19:32 +0000
+++ b/makefile 2013-02-23 16:03:05 +0000
@@ -52,8 +52,12 @@
ifeq (yes,$(DO_COPY))
LOAD_LOCATION=$(TMPDIR)
+COPY_CMD=cp $*.init $(TMPDIR); chmod 644 $(TMPDIR)/$*.init
+COPY_RM_CMD=rm -f $(TMPDIR)/$*.init
else
LOAD_LOCATION=$$PWD
+COPY_CMD=true
+COPY_RM_CMD=true
endif
# These variables hold the targets for each thing that needs to be done
@@ -92,10 +96,9 @@
@if grep -q $* elements_list; then \
mysql $(DBOPTS) $$LSBDB < $*.init; \
else \
- cp $*.init $(TMPDIR); \
- chmod 644 $(TMPDIR)/$*.init; \
+ $(COPY_CMD); \
mysql $(DBOPTS) $$LSBDB -e "load data $(LOCAL_INFILE_CMD) infile '$(LOAD_LOCATION)/$*.init' into table $*"; \
- rm -f $(TMPDIR)/$*.init; \
+ $(COPY_RM_CMD); \
fi
# dump the "source code" tables
More information about the lsb-messages
mailing list