#!/bin/sh 
#
# cleandb - shell script called from 'imsimta cleandb' to remove database
# temporary files.
#

##################################################################
# shell function to get a variable's value
# from tailor file.
##################################################################
getTailorValue() {
  if test -f $IMTA_TAILOR; then
    y=`/bin/grep "^$1=" $IMTA_TAILOR |/bin/awk -F= '{print $2}' | head -1`
  fi
  echo $y
}

# Remove SleepyCat-specific leftovers
tmp_dir=`getTailorValue IMTA_DB_TMP`
rm -f $tmp_dir/__db*.??? > /dev/null 2>&1
