]> granicus.if.org Git - php/commitdiff
MFH: dropped some more mime types, svnclean -> clean for multiple VCS
authorGwynne Raskind <gwynne@php.net>
Thu, 16 Jul 2009 04:54:26 +0000 (04:54 +0000)
committerGwynne Raskind <gwynne@php.net>
Thu, 16 Jul 2009 04:54:26 +0000 (04:54 +0000)
build/build.mk
cvsclean.bat [deleted file]
svnclean [deleted file]
vcsclean [new file with mode: 0755]

index 31a7ebbcbf15a40b7883555eceb8d96096a699ce..91143cb1f74ab410fa245656c12862b2ec39e4c1 100644 (file)
@@ -67,12 +67,15 @@ snapshot:
 
 cvsclean-work:
        @for i in `find . -name .cvsignore`; do \
-               (cd `dirname $$i` 2>/dev/null && rm -rf `cat .cvsignore | grep -v config.nice | sed 's/[\r\n]/ /g'` *.o *.a .libs || true); \
+               (cd `dirname $$i` 2>/dev/null && rm -rf `cat .cvsignore | grep -v config.nice | sed 's/[[:space:]]/ /g'` *.o *.a .libs || true); \
        done
 
 svnclean-work:
-       for i in `find . -type d -and -not -path '*/.svn/*'`; do \
-               (cd `dirname $$i` 2>/dev/null && svn propget svn:ignore $i | xargs rm -rf && rm -rf *.o *.a .libs || true);     \
+       @for i in `find . -type d -and -not -path '*/.svn/*'`; do \
+               (cd `dirname $$i` 2>/dev/null && svn propget svn:ignore $$i | xargs rm -rf && rm -rf *.o *.a .libs || true);    \
        done
 
+gitclean-work:
+       @echo "We don't know how to clean Git checkouts yet."
+
 .PHONY: $(ALWAYS) snapshot
diff --git a/cvsclean.bat b/cvsclean.bat
deleted file mode 100755 (executable)
index 4c0118d..0000000
+++ /dev/null
@@ -1,2 +0,0 @@
-@echo off
-cscript /nologo win32\build\cvsclean.js
diff --git a/svnclean b/svnclean
deleted file mode 100755 (executable)
index 0beda87..0000000
--- a/svnclean
+++ /dev/null
@@ -1,3 +0,0 @@
-#! /bin/sh
-
-${MAKE:-make} -f build/build.mk svnclean-work
diff --git a/vcsclean b/vcsclean
new file mode 100755 (executable)
index 0000000..e1004e4
--- /dev/null
+++ b/vcsclean
@@ -0,0 +1,11 @@
+#! /bin/sh
+
+if test -d 'CVS'; then
+    ${MAKE:-make} -f build/build.mk cvsclean-work
+elif test -d '.svn'; then
+    ${MAKE:-make} -f build/build.mk svnclean-work
+elif test -d '.git'; then
+    ${MAKE:-make} -f build/build.mk gitclean-work
+else
+    echo "Can't figure out your VCS, not cleaning."
+fi