#!/bin/bash -e
#
# hgwbeta-dbload [-inclEsts] [-extFileUpdate] [-allowLargeDeletes]
#
# dbload for hgwbeta
#
#   - separate script since hgwbeta is updated before rr
#   - does weekly dump of sequences, which are picked up by other rr nodes
opts="$*"

# initialize
gbRoot=/genbank
cd $gbRoot
. $gbRoot/lib/gbCommon.sh
databases=$(gbGetDatabases etc/hgwbeta.dbs)

# wait for copy to hgwnfs1
copyTime=var/copy/copy.time

# workdir is a local dir
workdir=/data/tmp/genbank

exec $gbRoot/etc/dbload -noGrepIndex $opts $gbRoot "$databases" $copyTime $workdir

