You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

38 lines
906 B
Plaintext

#!@BASH@
#
# add-urls 1.1
#
# Copyright (c) 1998-1999 The ht://Dig Group
# Distributed under the terms of the GNU General Public License (GPL)
# version 2 or later.
# for the ht://Dig search system http://www.htdig.org/
# and the multidig script system http://www.htdig.org/contrib/scripts/
#
# syntax:
# add-urls <db>
#
# Reads new URLs in from the standard input (either redirect or paste)
#
# You may need to set the following:
MULTIDIG_CONF=@CONFIG_DIR@/multidig.conf
source $MULTIDIG_CONF
# Catch people who don't supply an argument
if [ "$1" = "" ]; then
echo Syntax: add-urls \<db\>
exit
fi
# Do we actually have a database named as specified?
TEST=`grep $1 $DB_LIST`
if [ "$TEST" = "" ]; then
# This may become annoying. If so, comment it out!
echo The database $1 does not exist. Sorry.
echo The existing databases are:
cat $DB_LIST
else
cat /dev/stdin >>$DB_BASE/$1/$1.urls
fi