Index: /gs2-extensions/tdb/trunk/disable_tdb.sh
===================================================================
--- /gs2-extensions/tdb/trunk/disable_tdb.sh	(revision 30182)
+++ /gs2-extensions/tdb/trunk/disable_tdb.sh	(revision 30182)
@@ -0,0 +1,89 @@
+#!/bin/bash
+# Used to merge in the code needed to add TDB support to Greenstone. The script
+# is responsible for updating both Makefile.in and source code files. You can
+# later run 'disable_tdb.sh' to undo these changes.
+# @author John Thompson, University of Waikato, NZ
+
+echo
+echo '===== Removing TDB support code from Greenstone ====='
+echo
+
+# Test that GSDLHOME is set otherwise we won't be able to find the required files
+if [ "$GSDLHOME" == "" ] ; then echo 'Error! GSDLHOME not set. Please source setup.bash before running.' ; echo ; exit 0 ; fi
+
+
+echo ' - removing TDB support from common function library'
+# - Makefile.in
+sed -i 's:\(EXT_DEFINES\s*=.*\)\s-DUSE_TDB\(.*\):\1\2:' $GSDLHOME/common-src/src/lib/Makefile.in
+sed -i 's:\(EXT_INCLUDES\s*=.*\)\s-I$(GSDL_DIR)/ext/tdb-edit/linux/include\s*-I$(GSDL_DIR)/ext/tdb-edit/darwin/include\s*-I$(GSDL_DIR)/ext/tdb-edit/src/lib\(.*\):\1\2:' $GSDLHOME/common-src/src/lib/Makefile.in
+sed -i 's:\(EXT_SOURCES\s*=.*\)\stdbclass.cpp\(.*\):\1\2:' $GSDLHOME/common-src/src/lib/Makefile.in
+sed -i 's:\(EXT_OBJECTS\s*=.*\)\stdbclass.o\(.*\):\1\2:' $GSDLHOME/common-src/src/lib/Makefile.in
+rm -f $GSDLHOME/common-src/src/lib/Makefile
+# - Remove symlink
+rm -f $GSDLHOME/common-src/src/lib/tdbclass.h
+rm -f $GSDLHOME/common-src/src/lib/tdbclass.cpp
+# - Remove compiled files
+rm -f $GSDLHOME/common-src/src/lib/tdbclass.o
+rm -f $GSDLHOME/common-src/src/lib/gsdllib.a
+
+
+echo ' - removing TDB support from collection server'
+# - Makefile.in
+sed -i 's:\(EXT_DEFINES\s*=.*\)\s-DUSE_TDB\(.*\):\1\2:' $GSDLHOME/runtime-src/src/colservr/Makefile.in
+sed -i 's:\(EXT_INCLUDES\s*=.*\)\s-I$(GSDL_DIR)/ext/tdb-edit/linux/include\s*-I$(GSDL_DIR)/ext/tdb-edit/darwin/include\s*-I$(GSDL_DIR)/ext/tdb-edit/src/lib\(.*\):\1\2:' $GSDLHOME/runtime-src/src/colservr/Makefile.in
+rm -f $GSDLHOME/runtime-src/src/colservr/Makefile
+# - collectset.cpp
+# BUG: leaves behind the newlines...
+sed -i '/^#include "tdbclass.h" \/\/TDB/ d' $GSDLHOME/runtime-src/src/colservr/collectset.cpp
+sed -i '/^[ ]*if (infodbtype == "tdb") {db_ptr = new tdbclass(gsdlhome);} \/\/TDB/ d' $GSDLHOME/runtime-src/src/colservr/collectset.cpp
+sed -i '/^[ ]*if (infodbtype == "tdbserver") {db_ptr = new tdbclass(gsdlhome);} \/\/TDBServer/ d' $GSDLHOME/runtime-src/src/colservr/collectset.cpp
+# - collectserver.cpp
+sed -i '/^if (infodbtype == "tdb") { } \/\/ TDB Do nothing/ d' $GSDLHOME/runtime-src/src/colservr/collectset.cpp
+sed -i '/^if (infodbtype == "tdbserver") { } \/\/ TDBServer Do nothing/ d' $GSDLHOME/runtime-src/src/colservr/collectset.cpp
+# - Remove compiled files
+rm -f $GSDLHOME/runtime-src/src/colservr/gsdlcolservr.a
+
+
+
+
+echo ' - removing TDB support from Greenstone receptionist'
+# - Makefile.in
+sed -i 's:\(EXT_DEFINES\s*=.*\)\s-DUSE_TDB\(.*\):\1\2:' $GSDLHOME/runtime-src/src/recpt/Makefile.in
+sed -i 's:\(EXT_INCLUDES\s*=.*\)\s-I$(GSDL_DIR)/ext/tdb-edit/linux/include\s*-I$(GSDL_DIR)/ext/tdb-edit/darwin/include\s*-I$(GSDL_DIR)/ext/tdb-edit/src/lib\(.*\):\1\2:' $GSDLHOME/runtime-src/src/recpt/Makefile.in
+sed -i 's:\(EXT_LDFLAGS\s*=.*\)\s-L$(GSDL_DIR)/ext/tdb-edit/linux/lib -L$(GSDL_DIR)/ext/tdb-edit/darwin/lib\(.*\):\1\2:' $GSDLHOME/runtime-src/src/recpt/Makefile.in
+sed -i 's:\(EXT_LIBS\s*=.*\)\s-ltdb\(.*\):\1\2:' $GSDLHOME/runtime-src/src/recpt/Makefile.in
+rm -f $GSDLHOME/runtime-src/src/recpt/Makefile
+# - Remove compiled files
+rm -f $GSDLHOME/runtime-src/src/recpt/gsdlrecpt.a
+rm -f $GSDLHOME/runtime-src/src/recpt/library.cgi
+rm -f $GSDLHOME/cgi-bin/library.cgi
+
+
+echo ' - removing TDB support from OAI Server receptionist'
+# - Makefile.in
+sed -i 's:\(EXT_DEFINES\s*=.*\)\s-DUSE_TDB\(.*\):\1\2:' $GSDLHOME/runtime-src/src/oaiservr/Makefile.in
+sed -i 's:\(EXT_INCLUDES\s*=.*\)\s-I$(GSDL_DIR)/ext/tdb-edit/linux/include\s*-I$(GSDL_DIR)/ext/tdb-edit/darwin/include\s*-I$(GSDL_DIR)/ext/tdb-edit/src/lib\(.*\):\1\2:' $GSDLHOME/runtime-src/src/oaiservr/Makefile.in
+sed -i 's:\(EXT_LDFLAGS\s*=.*\)\s-L$(GSDL_DIR)/ext/tdb-edit/linux/lib -L$(GSDL_DIR)/ext/tdb-edit/darwin/lib\(.*\):\1\2:' $GSDLHOME/runtime-src/src/oaiservr/Makefile.in
+sed -i 's:\(EXT_LIBS\s*=.*\)\s-ltdb\(.*\):\1\2:' $GSDLHOME/runtime-src/src/oaiservr/Makefile.in
+rm -f $GSDLHOME/runtime-src/src/oaiservr/Makefile
+# - Remove compiled files
+rm -f $GSDLHOME/runtime-src/src/oaiservr/oaiserver.cgi
+rm -f $GSDLHOME/cgi-bin/oaiserver.cgi
+
+echo
+echo '====================================================='
+echo
+echo 'TDB support has now been removed from Greenstone.'
+echo 'Please return to the main Greenstone directory and'
+echo 'rerun:'
+echo
+echo ' ./configure <any required arguments>'
+echo ' make'
+echo ' make install'
+echo
+echo 'to complete TDB removal.'
+echo
+echo '====================================================='
+echo
+
+exit 0
Index: 2-extensions/tdb/trunk/src/disable_tdb.sh
===================================================================
--- /gs2-extensions/tdb/trunk/src/disable_tdb.sh	(revision 30181)
+++ 	(revision )
@@ -1,89 +1,0 @@
-#!/bin/bash
-# Used to merge in the code needed to add TDB support to Greenstone. The script
-# is responsible for updating both Makefile.in and source code files. You can
-# later run 'disable_tdb.sh' to undo these changes.
-# @author John Thompson, University of Waikato, NZ
-
-echo
-echo '===== Removing TDB support code from Greenstone ====='
-echo
-
-# Test that GSDLHOME is set otherwise we won't be able to find the required files
-if [ "$GSDLHOME" == "" ] ; then echo 'Error! GSDLHOME not set. Please source setup.bash before running.' ; echo ; exit 0 ; fi
-
-
-echo ' - removing TDB support from common function library'
-# - Makefile.in
-sed -i 's:\(EXT_DEFINES\s*=.*\)\s-DUSE_TDB\(.*\):\1\2:' $GSDLHOME/common-src/src/lib/Makefile.in
-sed -i 's:\(EXT_INCLUDES\s*=.*\)\s-I$(GSDL_DIR)/ext/tdb-edit/linux/include\s*-I$(GSDL_DIR)/ext/tdb-edit/darwin/include\s*-I$(GSDL_DIR)/ext/tdb-edit/src/lib\(.*\):\1\2:' $GSDLHOME/common-src/src/lib/Makefile.in
-sed -i 's:\(EXT_SOURCES\s*=.*\)\stdbclass.cpp\(.*\):\1\2:' $GSDLHOME/common-src/src/lib/Makefile.in
-sed -i 's:\(EXT_OBJECTS\s*=.*\)\stdbclass.o\(.*\):\1\2:' $GSDLHOME/common-src/src/lib/Makefile.in
-rm -f $GSDLHOME/common-src/src/lib/Makefile
-# - Remove symlink
-rm -f $GSDLHOME/common-src/src/lib/tdbclass.h
-rm -f $GSDLHOME/common-src/src/lib/tdbclass.cpp
-# - Remove compiled files
-rm -f $GSDLHOME/common-src/src/lib/tdbclass.o
-rm -f $GSDLHOME/common-src/src/lib/gsdllib.a
-
-
-echo ' - removing TDB support from collection server'
-# - Makefile.in
-sed -i 's:\(EXT_DEFINES\s*=.*\)\s-DUSE_TDB\(.*\):\1\2:' $GSDLHOME/runtime-src/src/colservr/Makefile.in
-sed -i 's:\(EXT_INCLUDES\s*=.*\)\s-I$(GSDL_DIR)/ext/tdb-edit/linux/include\s*-I$(GSDL_DIR)/ext/tdb-edit/darwin/include\s*-I$(GSDL_DIR)/ext/tdb-edit/src/lib\(.*\):\1\2:' $GSDLHOME/runtime-src/src/colservr/Makefile.in
-rm -f $GSDLHOME/runtime-src/src/colservr/Makefile
-# - collectset.cpp
-# BUG: leaves behind the newlines...
-sed -i '/^#include "tdbclass.h" \/\/TDB/ d' $GSDLHOME/runtime-src/src/colservr/collectset.cpp
-sed -i '/^[ ]*if (infodbtype == "tdb") {db_ptr = new tdbclass(gsdlhome);} \/\/TDB/ d' $GSDLHOME/runtime-src/src/colservr/collectset.cpp
-sed -i '/^[ ]*if (infodbtype == "tdbserver") {db_ptr = new tdbclass(gsdlhome);} \/\/TDBServer/ d' $GSDLHOME/runtime-src/src/colservr/collectset.cpp
-# - collectserver.cpp
-sed -i '/^if (infodbtype == "tdb") { } \/\/ TDB Do nothing/ d' $GSDLHOME/runtime-src/src/colservr/collectset.cpp
-sed -i '/^if (infodbtype == "tdbserver") { } \/\/ TDBServer Do nothing/ d' $GSDLHOME/runtime-src/src/colservr/collectset.cpp
-# - Remove compiled files
-rm -f $GSDLHOME/runtime-src/src/colservr/gsdlcolservr.a
-
-
-
-
-echo ' - removing TDB support from Greenstone receptionist'
-# - Makefile.in
-sed -i 's:\(EXT_DEFINES\s*=.*\)\s-DUSE_TDB\(.*\):\1\2:' $GSDLHOME/runtime-src/src/recpt/Makefile.in
-sed -i 's:\(EXT_INCLUDES\s*=.*\)\s-I$(GSDL_DIR)/ext/tdb-edit/linux/include\s*-I$(GSDL_DIR)/ext/tdb-edit/darwin/include\s*-I$(GSDL_DIR)/ext/tdb-edit/src/lib\(.*\):\1\2:' $GSDLHOME/runtime-src/src/recpt/Makefile.in
-sed -i 's:\(EXT_LDFLAGS\s*=.*\)\s-L$(GSDL_DIR)/ext/tdb-edit/linux/lib -L$(GSDL_DIR)/ext/tdb-edit/darwin/lib\(.*\):\1\2:' $GSDLHOME/runtime-src/src/recpt/Makefile.in
-sed -i 's:\(EXT_LIBS\s*=.*\)\s-ltdb\(.*\):\1\2:' $GSDLHOME/runtime-src/src/recpt/Makefile.in
-rm -f $GSDLHOME/runtime-src/src/recpt/Makefile
-# - Remove compiled files
-rm -f $GSDLHOME/runtime-src/src/recpt/gsdlrecpt.a
-rm -f $GSDLHOME/runtime-src/src/recpt/library.cgi
-rm -f $GSDLHOME/cgi-bin/library.cgi
-
-
-echo ' - removing TDB support from OAI Server receptionist'
-# - Makefile.in
-sed -i 's:\(EXT_DEFINES\s*=.*\)\s-DUSE_TDB\(.*\):\1\2:' $GSDLHOME/runtime-src/src/oaiservr/Makefile.in
-sed -i 's:\(EXT_INCLUDES\s*=.*\)\s-I$(GSDL_DIR)/ext/tdb-edit/linux/include\s*-I$(GSDL_DIR)/ext/tdb-edit/darwin/include\s*-I$(GSDL_DIR)/ext/tdb-edit/src/lib\(.*\):\1\2:' $GSDLHOME/runtime-src/src/oaiservr/Makefile.in
-sed -i 's:\(EXT_LDFLAGS\s*=.*\)\s-L$(GSDL_DIR)/ext/tdb-edit/linux/lib -L$(GSDL_DIR)/ext/tdb-edit/darwin/lib\(.*\):\1\2:' $GSDLHOME/runtime-src/src/oaiservr/Makefile.in
-sed -i 's:\(EXT_LIBS\s*=.*\)\s-ltdb\(.*\):\1\2:' $GSDLHOME/runtime-src/src/oaiservr/Makefile.in
-rm -f $GSDLHOME/runtime-src/src/oaiservr/Makefile
-# - Remove compiled files
-rm -f $GSDLHOME/runtime-src/src/oaiservr/oaiserver.cgi
-rm -f $GSDLHOME/cgi-bin/oaiserver.cgi
-
-echo
-echo '====================================================='
-echo
-echo 'TDB support has now been removed from Greenstone.'
-echo 'Please return to the main Greenstone directory and'
-echo 'rerun:'
-echo
-echo ' ./configure <any required arguments>'
-echo ' make'
-echo ' make install'
-echo
-echo 'to complete TDB removal.'
-echo
-echo '====================================================='
-echo
-
-exit 0
