Nmap Development mailing list archives
Re: [Patch] Forcibly copy scripts to overwrite .svn files
From: David Fifield <david () bamsoftware com>
Date: Sun, 20 May 2007 04:00:24 -0600
On Sat, May 19, 2007 at 09:27:22PM -0700, Fyodor wrote:
On Sat, May 19, 2007 at 09:53:50PM -0600, David Fifield wrote:On Fri, May 18, 2007 at 09:46:57PM -0700, Fyodor wrote:On Fri, May 18, 2007 at 01:57:18PM -0600, David Fifield wrote:install-nse: $(TARGET) # If this is a Subversion working copy, export the scripts directory to # avoid copying .svn directories. Otherwise, do a plain recursive copy. if test -d .svn; then \ svn export --force scripts $(DESTDIR)$(nmapdatadir)/scripts; \ else \ cp -rf scripts/ $(DESTDIR)$(nmapdatadir)/; \ fiThat is a clever approach, but users might find this behavior unexpected. I think people expect their current tree to be installed when you do "make install". But in this case you will get something else (the SVN head copy) if you have made any local changes or if anyone else has checked anything in since your last svn up. Also this will only work if you have net access at the time.
Actually, "svn export" doesn't access the remote repository unless exporting from a URL. I checked to make sure the above command exports from the working copy, including local changes, and doesn't access the network.
If we don't really need a recursive copy (the scripts directory doesn't contain any subdirectories; I don't know if that's going to change), solving this could be as simple as install-nse: $(TARGET) $(SHTOOL) mkdir -f -p -m 755 $(DESTDIR)$(nmapdatadir)/scripts cp scripts/* $(DESTDIR)$(nmapdatadir)/scripts/
Me too. I didn't know if the scripts directory can contain subdirectories, which this precludes. I can think of a way to do a recursive copy like this using recursive invocations of GNU Make but a comment in the Makefile makes me think depending on GNU Make is undesirable: # %.o : %.cc -- nope this is a GNU extension All this because cp doesn't have an --exclude flag! Maybe someone else has something simpler. David _______________________________________________ Sent through the nmap-dev mailing list http://cgi.insecure.org/mailman/listinfo/nmap-dev Archived at http://SecLists.Org
Current thread:
- [Patch] Forcibly copy scripts to overwrite .svn files David Fifield (May 18)
- Re: [Patch] Forcibly copy scripts to overwrite .svn files Kris Katterjohn (May 18)
- Re: [Patch] Forcibly copy scripts to overwrite .svn files David Fifield (May 18)
- Re: [Patch] Forcibly copy scripts to overwrite .svn files Kris Katterjohn (May 18)
- Re: [Patch] Forcibly copy scripts to overwrite .svn files David Fifield (May 18)
- Re: [Patch] Forcibly copy scripts to overwrite .svn files Fyodor (May 18)
- Re: [Patch] Forcibly copy scripts to overwrite .svn files David Fifield (May 19)
- Re: [Patch] Forcibly copy scripts to overwrite .svn files Fyodor (May 19)
- Re: [Patch] Forcibly copy scripts to overwrite .svn files David Fifield (May 20)
- Re: [Patch] Forcibly copy scripts to overwrite .svn files Arturo 'Buanzo' Busleiman (May 20)
- Re: [Patch] Forcibly copy scripts to overwrite .svn files Fyodor (May 21)
- Re: [Patch] Forcibly copy scripts to overwrite .svn files David Fifield (May 21)
- Re: [Patch] Forcibly copy scripts to overwrite .svn files Fyodor (May 22)
- Re: [Patch] Forcibly copy scripts to overwrite .svn files David Fifield (May 19)
- Re: [Patch] Forcibly copy scripts to overwrite .svn files Kris Katterjohn (May 18)