Nmap Development mailing list archives

Re: [Patch] Forcibly copy scripts to overwrite .svn files


From: Fyodor <fyodor () insecure org>
Date: Sat, 19 May 2007 21:27:22 -0700

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)/; \
        fi

That 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.

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/

I think I like this approach best.

Cheers,
-F

_______________________________________________
Sent through the nmap-dev mailing list
http://cgi.insecure.org/mailman/listinfo/nmap-dev
Archived at http://SecLists.Org


Current thread: