X-Git-Url: https://code.citadel.org/?a=blobdiff_plain;f=citadel%2Fdatabase_cleanup.sh.in;h=bbfa64674ad01a1c4e09afb410dab82c0977434a;hb=HEAD;hp=0d3aeb93dee169eb2ba3222b640ec84c6b982810;hpb=6e1b646b62cd5be85e15a432ca8fd399d97531c5;p=citadel.git diff --git a/citadel/database_cleanup.sh.in b/citadel/database_cleanup.sh.in deleted file mode 100755 index 0d3aeb93d..000000000 --- a/citadel/database_cleanup.sh.in +++ /dev/null @@ -1,124 +0,0 @@ -#!/bin/bash - -die () { - echo Exiting. - exit 1 -} - -# data dir from autoconf? -DATA_DIR="@MAKE_DATA_DIR@" -if test -z "$DATA_DIR" ; then - DATA_DIR="/usr/local/citadel" -fi -DATA_DIR=$DATA_DIR/data - -# If we're on an Easy Install system, use our own db_ tools. -# -if [ -x /usr/local/ctdlsupport/bin/db_dump ] ; then - export PATH=/usr/local/ctdlsupport/bin:$PATH - RECOVER=/usr/local/ctdlsupport/bin/db_recover - DUMP=/usr/local/ctdlsupport/bin/db_dump - LOAD=/usr/local/ctdlsupport/bin/db_load - -else - # ok usual install? - if test -f /usr/bin/db_dump; then - RECOVER=/usr/bin/db_recover - DUMP=/usr/bin/db_dump - LOAD=/usr/bin/db_load - else - if test -n "`ls /usr/bin/db?*recover`"; then - # seems we have something debian alike thats adding version in the filename - if test "`ls /usr/bin/db*recover |wc -l`" -gt "1"; then - echo "Warning: you have more than one version of the Berkeley DB utilities installed." 1>&2 - echo "Using the latest one." 1>&2 - RECOVER=`ls /usr/bin/db*recover |sort |tail -n 1` - DUMP=`ls /usr/bin/db*dump |sort |tail -n 1` - LOAD=`ls /usr/bin/db*load |sort |tail -n 1` - else - RECOVER=`ls /usr/bin/db*recover` - DUMP=`ls /usr/bin/db*dump` - LOAD=`ls /usr/bin/db*load` - fi - else - echo "database_cleanup.sh cannot find the Berkeley DB utilities. Exiting." 1>&2 - die - fi - - fi -fi - -# Ok, let's begin. -# - -clear -cat </tmp/CitaDump.$x || die - rm -f $DATA_DIR/$filename -done - -echo Removing old databases -rm -f ./data/* - -for x in 00 01 02 03 04 05 06 07 08 09 0a 0b -do - filename=cdb.$x - echo Loading $filename - $LOAD -h $DATA_DIR $filename