Permalink
Browse files

Make "make install" faster and less intrusive on large sites with many

archived .shtml files, and make it slightly more compatible with SunOS.
  • Loading branch information...
1 parent 4b3cf8e commit 33aa10d20c71df1b6c7eb80b3853e6673f946b67 @jamiemccarthy jamiemccarthy committed Jan 4, 2002
Showing with 21 additions and 2 deletions.
  1. +21 −2 Makefile
View
@@ -31,6 +31,7 @@ USER = nobody
GROUP = nobody
CP = cp
INSTALL = install
+UNAME = `uname`
# Plugins (any directory in plugins/)
PLUGINS = `find . -name CVS -prune -o -type d -name [a-zA-Z]\* -maxdepth 1 -print`
@@ -202,8 +203,26 @@ install: slash plugins
fi; \
done)
# Remove any kruft thay may have been copied that shouldn't have been.
- -find $(SLASH_PREFIX) \( -name CVS -type d -o -name \.\#\* -type f \) \
- -printf '(cleaning out %p)\n' -exec rm -rf {} \; 2> /dev/null
+ # Normally we save some time by not diving into an installed site's
+ # htdocs' archived directories, but apparently Sun's "find" doesn't
+ # support "-path" so skip it.
+ if [ $(UNAME) != "SunOS" ]; then \
+ find $(SLASH_PREFIX) \
+ \( -type d -a -path */site/*/htdocs*/[0-9][0-9]* -a -prune \) \
+ -o \
+ \( -name CVS -type d -o -name .#* -type f \) \
+ -a \( -prune \
+ -exec echo "(cleaning out {})" \; \
+ -exec rm -rf {} \; \) \
+ 2> /dev/null ; \
+ else \
+ find $(SLASH_PREFIX) \
+ \( -name CVS -type d -o -name .#* -type f \) \
+ -a \( -prune \
+ -exec echo "(cleaning out {})" \; \
+ -exec rm -rf {} \; \) \
+ 2> /dev/null ; \
+ fi
touch $(SLASH_PREFIX)/slash.sites
chown $(USER):$(GROUP) $(SLASH_PREFIX)

0 comments on commit 33aa10d

Please sign in to comment.