Changeset: 605ef1d12b84 for MonetDB
URL: http://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=605ef1d12b84
Modified Files:
        buildtools/conf/Mdebootstrap
        de-bootstrap
Branch: default
Log Message:

major clean-up of de-bootstrap script


diffs (210 lines):

diff -r f05f12c5e77f -r 605ef1d12b84 buildtools/conf/Mdebootstrap
--- a/buildtools/conf/Mdebootstrap      Tue Jan 18 19:54:00 2011 +0100
+++ /dev/null   Thu Jan 01 00:00:00 1970 +0000
@@ -1,128 +0,0 @@
-#!/usr/bin/env bash
-
-# The contents of this file are subject to the MonetDB Public License
-# Version 1.1 (the "License"); you may not use this file except in
-# compliance with the License. You may obtain a copy of the License at
-# http://monetdb.cwi.nl/Legal/MonetDBLicense-1.1.html
-#
-# Software distributed under the License is distributed on an "AS IS"
-# basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the
-# License for the specific language governing rights and limitations
-# under the License.
-#
-# The Original Code is the MonetDB Database System.
-#
-# The Initial Developer of the Original Code is CWI.
-# Portions created by CWI are Copyright (C) 1997-July 2008 CWI.
-# Copyright August 2008-2011 MonetDB B.V.
-# All Rights Reserved.
-
-if [ "$1" ] ; then
-       echo '
-This script ("./de-bootstrap") can be used to clean up the source tree, 
-i.e., to remove all files that were created by "./bootstrap".
-
-"./de-bootstrap" first lists all files that are to be removed and 
-asks the user for confirmation before actually removing the files.
-'
-       exit
-fi
-
-function RM () {
-       if [ "x$1" = 'x-f' ]; then
-               shift
-       fi
-
-       L=-d
-       R=''
-       G=''
-       if [ "x$1" = 'x-r' -o "x$1" = 'x-rf' -o "x$1" = 'x-fr' ]; then
-               shift
-               L=-R
-               R=-r
-               G='/$|'
-       fi
-
-       x=N
-       n=`ls -A $L $* 2>/dev/null | egrep -v "^total [0-9]*$|^$|^[^ ]*:$" | wc 
-l | sed 's|^ *||'` 
-       if [ $n != '0' ]; then
-               ls -lAF $L $* 2>/dev/null | egrep -v "$G^total [0-9]*$|^$" 
-               echo -e "Delete these $n files/directories? (y/N) \c"
-               read x 
-               if [ "x$x" = 'xy' ]; then
-                       ( /bin/rm -f $R $*  &&  echo "$n files deleted." )  ||  
echo "rm failed."
-               else
-                       echo "rm cancelled, no files/directories deleted."
-               fi
-       fi
-}
-
-cvs=""
-whats=""
-if [ -d .hg ]; then
-       # top-level Mecurial (HG) directory;
-       # hence we need to loop over all qualifying subdirectories
-       for i in */ ; do
-               if [ -f $i/CVS/Repository ]; then
-                       what="`cat $i/CVS/Repository | tr -d '\r'`"
-                       what="`basename $what | tr -d '\r'`"
-                       whats="$whats $what"
-                       cvs="$cvs $what"
-               else
-                       what="${i%/}"
-                       whats="$whats $what"
-               fi
-       done
-       what=""
-elif [ -f CVS/Repository ]; then
-       # then, try the CVS repository name to guess the value for $whats
-       what="`cat CVS/Repository | tr -d '\r'`"
-       what="`basename $what | tr -d '\r'`"
-elif [ -f autogen/autogen.py  -a  -f mel/mel.mx  -a  -f Mx/Mx.h  -a  -f 
burg/burs.c ]; then
-       # then, check for the existence of "characteristic" files
-       what="buildtools"
-else
-       # otherwise, use the current directory's (base)name to guess, which of
-       # buildtools java, MonetDB, testing, clients, MonetDB4, MonetDB5, 
template, sql, geom, pathfinder, datacell
-       # we are.
-       what="`pwd`"
-       what="`basename $what | tr -d '\r'`"
-fi
-if [ "$whats" = ""  -a  "$what" != "" ]; then
-       whats="$what"
-fi
-
-for what in $whats ; do
-       echo
-       echo $what
-       ( { { test -d .hg && cd "$what" ; } || test "${PWD##*/}" = "$what" ; } 
&&
-               if [ "$what" = "buildtools" ] ; then
-                       RM -rf 
{,*/}{autom4te.cache,build,configure,depcomp,INSTALL,install-sh,missing,*_config.h.in,aclocal.m4,Makefile.in}
 config.guess config.sub ltmain.sh `find .[^.]* [^_]* -name \*.class -o -name 
\*.orig -o -name \*.rej -o -name .cache -o -name .incs.\* -o -name \*.pyc -o 
-name \*~ -o -name .\*~ -o -name .#\* -o -name \*.bak | grep -v 
'burg/Makefile.orig$'` ./install.lst ./doc.lst */*.obj
-               elif [ "$what" != "NT" ] ; then
-                       RM -rf autom4*.cache `find .[^.]* [^_]* -name 
Makefile.\* | egrep -v 
'(\.(|ag|standalone|rules|bsd|svr4|sun4|PL|inc|svn-base)|burg/Makefile.orig)$' 
; find .[^.]* [^_]* -name \*.class -o -name \*.orig -o -name \*.rej -o -name 
.cache -o -name .incs.\* -o -name \*.pyc -o -name \*~ -o -name .\*~ -o -name 
.#\* -o -name \*.bak | grep -v 'burg/Makefile.orig$'` ./install.lst ./doc.lst 
./acout.in ./configure.in ./aclocal.m4 ./configure ./stamp-h.in ./conf/depcomp 
./conf/mkinstalldirs ./conf/stamp-h.in ./conf/config.h.in ./conf/install-sh 
./conf/config.guess ./conf/config.sub ./conf/ltconfig ./conf/ltmain.sh 
./conf/missing ./conf/compile ./acconfig.h ./*_config.h.in
-               fi
-       )
-       echo
-done
-
-if [ -d CVS ]; then
-    echo '
-It might be a good idea to run "cvs -q diff --brief", now,
-to check whether required files have been removed accidentally.
-If so, these files can be restored by "cvs update <file>".
-'
-else
-    echo '
-It might be a good idea to run "hg status -d", now,
-to check whether required files have been removed accidentally.
-If so, these files can be restored by "hg revert <file>".
-'
-    if [ "$cvs" ]; then
-        echo '
-It might also be a good idea to run "cvs -q diff --brief", now,
-in the following directories: "'"${cvs# }"'"
-to check whether required files have been removed accidentally.
-If so, these files can be restored by "cvs update <file>".
-'
-    fi
-fi
diff -r f05f12c5e77f -r 605ef1d12b84 de-bootstrap
--- a/de-bootstrap      Tue Jan 18 19:54:00 2011 +0100
+++ b/de-bootstrap      Tue Jan 18 19:54:40 2011 +0100
@@ -1,3 +1,73 @@
 # -*-shell-script-*-
 
-./buildtools/conf/Mdebootstrap
+# The contents of this file are subject to the MonetDB Public License
+# Version 1.1 (the "License"); you may not use this file except in
+# compliance with the License. You may obtain a copy of the License at
+# http://monetdb.cwi.nl/Legal/MonetDBLicense-1.1.html
+#
+# Software distributed under the License is distributed on an "AS IS"
+# basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the
+# License for the specific language governing rights and limitations
+# under the License.
+#
+# The Original Code is the MonetDB Database System.
+#
+# The Initial Developer of the Original Code is CWI.
+# Portions created by CWI are Copyright (C) 1997-July 2008 CWI.
+# Copyright August 2008-2011 MonetDB B.V.
+# All Rights Reserved.
+
+if [ "$1" ] ; then
+       echo '
+This script ("./de-bootstrap") can be used to clean up the source tree, 
+i.e., to remove all files that were created by "./bootstrap".
+
+"./de-bootstrap" first lists all files that are to be removed and 
+asks the user for confirmation before actually removing the files.
+'
+       exit
+fi
+
+function RM () {
+       if [ "x$1" = 'x-f' ]; then
+               shift
+       fi
+
+       L=-d
+       R=''
+       G=''
+       if [ "x$1" = 'x-r' -o "x$1" = 'x-rf' -o "x$1" = 'x-fr' ]; then
+               shift
+               L=-R
+               R=-r
+               G='/$|'
+       fi
+
+       x=N
+       n=`ls -A $L $* 2>/dev/null | egrep -v "^total [0-9]*$|^$|^[^ ]*:$" | wc 
-l | sed 's|^ *||'` 
+       if [ $n != '0' ]; then
+               ls -lAF $L $* 2>/dev/null | egrep -v "$G^total [0-9]*$|^$" 
+               echo -e "Delete these $n files/directories? (y/N) \c"
+               read x 
+               if [ "x$x" = 'xy' ]; then
+                       ( /bin/rm -f $R $*  &&  echo "$n files deleted." )  ||  
echo "rm failed."
+               else
+                       echo "rm cancelled, no files/directories deleted."
+               fi
+       fi
+}
+
+if [ ! -d .hg ] ; then
+       echo '
+This script ("./de-bootstrap") must be called in top-level directory of
+MonetDB'\''s Mercurial (HG) source clone.
+'
+       exit 1
+fi
+
+RM -rf `find .[^.]* [^_]* -name Makefile.\* -o -name \*.pyc | egrep -v 
'\.(ag|PL)$'` aclocal.m4 acout.in autom4te.cache 
buildtools/conf/{config.{guess,sub},install-sh,ltmain.sh,l[ti]*.m4,missing,ylwrap}
 configure{,.ac} {doc,install}.lst monetdb_config.h.in
+echo '
+It might be a good idea to run "hg status -d", now,
+to check whether required files have been removed accidentally.
+If so, these files can be restored by "hg revert <file>".
+'
_______________________________________________
Checkin-list mailing list
[email protected]
http://mail.monetdb.org/mailman/listinfo/checkin-list

Reply via email to