mirror of
https://github.com/php/php-src.git
synced 2025-08-16 05:58:45 +02:00
Removed cvsclean and svnclean tools
This commit is contained in:
parent
cfccdc6362
commit
244c289f9c
5 changed files with 2 additions and 260 deletions
|
@ -1,7 +1,7 @@
|
||||||
# +----------------------------------------------------------------------+
|
# +----------------------------------------------------------------------+
|
||||||
# | PHP Version 5 |
|
# | PHP Version 5 |
|
||||||
# +----------------------------------------------------------------------+
|
# +----------------------------------------------------------------------+
|
||||||
# | Copyright (c) 1997-2006 The PHP Group |
|
# | Copyright (c) 1997-2014 The PHP Group |
|
||||||
# +----------------------------------------------------------------------+
|
# +----------------------------------------------------------------------+
|
||||||
# | This source file is subject to version 3.01 of the PHP license, |
|
# | This source file is subject to version 3.01 of the PHP license, |
|
||||||
# | that is bundled with this package in the file LICENSE, and is |
|
# | that is bundled with this package in the file LICENSE, and is |
|
||||||
|
@ -14,8 +14,6 @@
|
||||||
# | Author: Sascha Schumann <sascha@schumann.cx> |
|
# | Author: Sascha Schumann <sascha@schumann.cx> |
|
||||||
# +----------------------------------------------------------------------+
|
# +----------------------------------------------------------------------+
|
||||||
#
|
#
|
||||||
# $Id$
|
|
||||||
#
|
|
||||||
#
|
#
|
||||||
# Makefile to generate build tools
|
# Makefile to generate build tools
|
||||||
#
|
#
|
||||||
|
@ -61,16 +59,6 @@ snapshot:
|
||||||
md5sum $$distname.tar.bz2; \
|
md5sum $$distname.tar.bz2; \
|
||||||
bzip2 -t $$distname.tar.bz2
|
bzip2 -t $$distname.tar.bz2
|
||||||
|
|
||||||
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/[[:space:]]/ /g'` *.o *.a *.lo *.la *.gcno *.gcda .libs || true); \
|
|
||||||
done
|
|
||||||
|
|
||||||
svnclean-work:
|
|
||||||
@for i in `find . -type d ! -path '*/.svn/*' | grep -v '.svn'`; do \
|
|
||||||
(cd $$i 2>/dev/null && rm -rf `svn propget svn:ignore . | grep -v config.nice` *.o *.a *.lo *.la *.gcno *.gcda .libs || true); \
|
|
||||||
done
|
|
||||||
|
|
||||||
gitclean-work:
|
gitclean-work:
|
||||||
@if (test ! -f '.git/info/exclude' || grep -s "git-ls-files" .git/info/exclude); then \
|
@if (test ! -f '.git/info/exclude' || grep -s "git-ls-files" .git/info/exclude); then \
|
||||||
(echo "Rebuild .git/info/exclude" && echo '*.o' > .git/info/exclude && git svn propget svn:ignore | grep -v config.nice >> .git/info/exclude); \
|
(echo "Rebuild .git/info/exclude" && echo '*.o' > .git/info/exclude && git svn propget svn:ignore | grep -v config.nice >> .git/info/exclude); \
|
||||||
|
|
|
@ -1,2 +0,0 @@
|
||||||
@echo off
|
|
||||||
cscript /nologo win32\build\cvsclean.js
|
|
6
vcsclean
6
vcsclean
|
@ -1,10 +1,6 @@
|
||||||
#! /bin/sh
|
#! /bin/sh
|
||||||
|
|
||||||
if test -d 'CVS'; then
|
if test -d '.git'; 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
|
${MAKE:-make} -f build/build.mk gitclean-work
|
||||||
else
|
else
|
||||||
echo "Can't figure out your VCS, not cleaning."
|
echo "Can't figure out your VCS, not cleaning."
|
||||||
|
|
|
@ -1,120 +0,0 @@
|
||||||
/*
|
|
||||||
+----------------------------------------------------------------------+
|
|
||||||
| PHP Version 5 |
|
|
||||||
+----------------------------------------------------------------------+
|
|
||||||
| Copyright (c) 1997-2009 The PHP Group |
|
|
||||||
+----------------------------------------------------------------------+
|
|
||||||
| This source file is subject to version 3.01 of the PHP license, |
|
|
||||||
| that is bundled with this package in the file LICENSE, and is |
|
|
||||||
| available through the world-wide-web at the following url: |
|
|
||||||
| http://www.php.net/license/3_01.txt |
|
|
||||||
| If you did not receive a copy of the PHP license and are unable to |
|
|
||||||
| obtain it through the world-wide-web, please send a note to |
|
|
||||||
| license@php.net so we can mail you a copy immediately. |
|
|
||||||
+----------------------------------------------------------------------+
|
|
||||||
| Author: Wez Furlong <wez@thebrainroom.com> |
|
|
||||||
| Pierre A. Joye <pierre@php.net> |
|
|
||||||
+----------------------------------------------------------------------+
|
|
||||||
*/
|
|
||||||
|
|
||||||
/* $Id$ */
|
|
||||||
// Cleans up files that do not belong in the repository
|
|
||||||
|
|
||||||
var FSO = WScript.CreateObject("Scripting.FileSystemObject");
|
|
||||||
var WshShell = WScript.CreateObject("WScript.Shell");
|
|
||||||
var STDOUT = WScript.StdOut;
|
|
||||||
|
|
||||||
/* svn propget svn:ignore dirname */
|
|
||||||
function find_ignore(dirname)
|
|
||||||
{
|
|
||||||
dirname = "" + dirname;
|
|
||||||
dirname_len = dirname.length;
|
|
||||||
|
|
||||||
if (!FSO.FolderExists(dirname) || (dirname_len >= 4 &&
|
|
||||||
dirname.substring(dirname_len - 4) == ".svn")) {
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
var f = FSO.GetFolder(dirname);
|
|
||||||
var fc = new Enumerator(f.SubFolders);
|
|
||||||
|
|
||||||
for (; !fc.atEnd(); fc.moveNext()) {
|
|
||||||
find_ignore(fc.item());
|
|
||||||
}
|
|
||||||
|
|
||||||
kill_from_ignore(dirname);
|
|
||||||
}
|
|
||||||
|
|
||||||
/* recursive remove using ignore props style wildcard matching;
|
|
||||||
* note that FSO.DeleteFolder and FSO.DeleteFile methods both
|
|
||||||
* accept wildcards, but that they are dangerous to use eg:
|
|
||||||
* "*.php" will match "*.phpt" */
|
|
||||||
function rm_r(filename)
|
|
||||||
{
|
|
||||||
if (FSO.FolderExists(filename)) {
|
|
||||||
var fc = new Enumerator(FSO.GetFolder(filename).SubFolders);
|
|
||||||
|
|
||||||
for (; !fc.atEnd(); fc.moveNext()) {
|
|
||||||
rm_r(fc.item());
|
|
||||||
}
|
|
||||||
|
|
||||||
fc = new Enumerator(FSO.GetFolder(filename).Files);
|
|
||||||
|
|
||||||
for (; !fc.atEnd(); fc.moveNext()) {
|
|
||||||
FSO.DeleteFile(fc.item(), true);
|
|
||||||
}
|
|
||||||
|
|
||||||
FSO.DeleteFolder(filename, true);
|
|
||||||
} else if (FSO.FileExists(filename)) {
|
|
||||||
FSO.DeleteFile(filename, true);
|
|
||||||
} else {
|
|
||||||
/* we need to handle wildcards here */
|
|
||||||
var foldername = FSO.GetParentFolderName(filename);
|
|
||||||
|
|
||||||
if (foldername == "")
|
|
||||||
foldername = ".";
|
|
||||||
|
|
||||||
var filename = FSO.GetFileName(filename);
|
|
||||||
|
|
||||||
var retext = filename.replace(/\./g, '\\.');
|
|
||||||
retext = '^' + retext.replace(/\*/g, '.*') + "$";
|
|
||||||
var re = new RegExp(retext);
|
|
||||||
|
|
||||||
var folder = FSO.GetFolder(foldername);
|
|
||||||
var fc = new Enumerator(folder.SubFolders);
|
|
||||||
for (; !fc.atEnd(); fc.moveNext()) {
|
|
||||||
|
|
||||||
var item = FSO.GetFileName(fc.item());
|
|
||||||
|
|
||||||
if (item.match(re)) {
|
|
||||||
rm_r(fc.item());
|
|
||||||
}
|
|
||||||
}
|
|
||||||
var fc = new Enumerator(folder.Files);
|
|
||||||
for (; !fc.atEnd(); fc.moveNext()) {
|
|
||||||
item = FSO.GetFileName(fc.item());
|
|
||||||
|
|
||||||
if (item.match(re)) {
|
|
||||||
FSO.DeleteFile(fc.item(), true);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
function kill_from_ignore(dirname)
|
|
||||||
{
|
|
||||||
var l;
|
|
||||||
var e = WshShell.Exec("svn propget svn:ignore " + dirname);
|
|
||||||
var re = /^(config\.nice.*)|(\*)$/i;
|
|
||||||
|
|
||||||
while (!e.StdOut.atEndOfStream) {
|
|
||||||
l = e.StdOut.ReadLine();
|
|
||||||
if (l.length == 0 || re.test(l)) {
|
|
||||||
continue;
|
|
||||||
}
|
|
||||||
rm_r(dirname + l);
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
find_ignore(".");
|
|
|
@ -1,120 +0,0 @@
|
||||||
/*
|
|
||||||
+----------------------------------------------------------------------+
|
|
||||||
| PHP Version 5 |
|
|
||||||
+----------------------------------------------------------------------+
|
|
||||||
| Copyright (c) 1997-2009 The PHP Group |
|
|
||||||
+----------------------------------------------------------------------+
|
|
||||||
| This source file is subject to version 3.01 of the PHP license, |
|
|
||||||
| that is bundled with this package in the file LICENSE, and is |
|
|
||||||
| available through the world-wide-web at the following url: |
|
|
||||||
| http://www.php.net/license/3_01.txt |
|
|
||||||
| If you did not receive a copy of the PHP license and are unable to |
|
|
||||||
| obtain it through the world-wide-web, please send a note to |
|
|
||||||
| license@php.net so we can mail you a copy immediately. |
|
|
||||||
+----------------------------------------------------------------------+
|
|
||||||
| Author: Wez Furlong <wez@thebrainroom.com> |
|
|
||||||
| Pierre A. Joye <pierre@php.net> |
|
|
||||||
+----------------------------------------------------------------------+
|
|
||||||
*/
|
|
||||||
|
|
||||||
/* $Id$ */
|
|
||||||
// Cleans up files that do not belong in the repository
|
|
||||||
|
|
||||||
var FSO = WScript.CreateObject("Scripting.FileSystemObject");
|
|
||||||
var WshShell = WScript.CreateObject("WScript.Shell");
|
|
||||||
var STDOUT = WScript.StdOut;
|
|
||||||
|
|
||||||
/* svn propget svn:ignore dirname */
|
|
||||||
function find_ignore(dirname)
|
|
||||||
{
|
|
||||||
dirname = "" + dirname;
|
|
||||||
dirname_len = dirname.length;
|
|
||||||
|
|
||||||
if (!FSO.FolderExists(dirname) || (dirname_len >= 4 &&
|
|
||||||
dirname.substring(dirname_len - 4) == ".svn")) {
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
var f = FSO.GetFolder(dirname);
|
|
||||||
var fc = new Enumerator(f.SubFolders);
|
|
||||||
|
|
||||||
for (; !fc.atEnd(); fc.moveNext()) {
|
|
||||||
find_ignore(fc.item());
|
|
||||||
}
|
|
||||||
|
|
||||||
kill_from_ignore(dirname);
|
|
||||||
}
|
|
||||||
|
|
||||||
/* recursive remove using ignore props style wildcard matching;
|
|
||||||
* note that FSO.DeleteFolder and FSO.DeleteFile methods both
|
|
||||||
* accept wildcards, but that they are dangerous to use eg:
|
|
||||||
* "*.php" will match "*.phpt" */
|
|
||||||
function rm_r(filename)
|
|
||||||
{
|
|
||||||
if (FSO.FolderExists(filename)) {
|
|
||||||
var fc = new Enumerator(FSO.GetFolder(filename).SubFolders);
|
|
||||||
|
|
||||||
for (; !fc.atEnd(); fc.moveNext()) {
|
|
||||||
rm_r(fc.item());
|
|
||||||
}
|
|
||||||
|
|
||||||
fc = new Enumerator(FSO.GetFolder(filename).Files);
|
|
||||||
|
|
||||||
for (; !fc.atEnd(); fc.moveNext()) {
|
|
||||||
FSO.DeleteFile(fc.item(), true);
|
|
||||||
}
|
|
||||||
|
|
||||||
FSO.DeleteFolder(filename, true);
|
|
||||||
} else if (FSO.FileExists(filename)) {
|
|
||||||
FSO.DeleteFile(filename, true);
|
|
||||||
} else {
|
|
||||||
/* we need to handle wildcards here */
|
|
||||||
var foldername = FSO.GetParentFolderName(filename);
|
|
||||||
|
|
||||||
if (foldername == "")
|
|
||||||
foldername = ".";
|
|
||||||
|
|
||||||
var filename = FSO.GetFileName(filename);
|
|
||||||
|
|
||||||
var retext = filename.replace(/\./g, '\\.');
|
|
||||||
retext = '^' + retext.replace(/\*/g, '.*') + "$";
|
|
||||||
var re = new RegExp(retext);
|
|
||||||
|
|
||||||
var folder = FSO.GetFolder(foldername);
|
|
||||||
var fc = new Enumerator(folder.SubFolders);
|
|
||||||
for (; !fc.atEnd(); fc.moveNext()) {
|
|
||||||
|
|
||||||
var item = FSO.GetFileName(fc.item());
|
|
||||||
|
|
||||||
if (item.match(re)) {
|
|
||||||
rm_r(fc.item());
|
|
||||||
}
|
|
||||||
}
|
|
||||||
var fc = new Enumerator(folder.Files);
|
|
||||||
for (; !fc.atEnd(); fc.moveNext()) {
|
|
||||||
item = FSO.GetFileName(fc.item());
|
|
||||||
|
|
||||||
if (item.match(re)) {
|
|
||||||
FSO.DeleteFile(fc.item(), true);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
function kill_from_ignore(dirname)
|
|
||||||
{
|
|
||||||
var l;
|
|
||||||
var e = WshShell.Exec("svn propget svn:ignore " + dirname);
|
|
||||||
var re = /^(config\.nice.*)|(\*)$/i;
|
|
||||||
|
|
||||||
while (!e.StdOut.atEndOfStream) {
|
|
||||||
l = e.StdOut.ReadLine();
|
|
||||||
if (l.length == 0 || re.test(l)) {
|
|
||||||
continue;
|
|
||||||
}
|
|
||||||
rm_r(dirname + l);
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
find_ignore(".");
|
|
Loading…
Add table
Add a link
Reference in a new issue