| 1 |
#!@BASH@ |
| 2 |
|
| 3 |
# |
| 4 |
# add-urls 1.1 |
| 5 |
# |
| 6 |
# Copyright (c) 1998-1999 The ht://Dig Group |
| 7 |
# Distributed under the terms of the GNU General Public License (GPL) |
| 8 |
# version 2 or later. |
| •9 |
# for the ht://Dig search system https://htdig.sourceforge.net/ |
| 10 |
# and the multidig script system https://htdig.sourceforge.net/contrib/scripts/ |
| 11 |
# |
| 12 |
# syntax: |
| 13 |
# add-urls <db> |
| 14 |
# |
| 15 |
# Reads new URLs in from the standard input (either redirect or paste) |
| 16 |
# |
| 17 |
|
| 18 |
# You may need to set the following: |
| 19 |
MULTIDIG_CONF=@CONFIG_DIR@/multidig.conf |
| 20 |
source $MULTIDIG_CONF |
| 21 |
|
| 22 |
# Catch people who don't supply an argument |
| 23 |
if [ "$1" = "" ]; then |
| 24 |
echo Syntax: add-urls \<db\> |
| 25 |
exit |
| 26 |
fi |
| 27 |
|
| 28 |
# Do we actually have a database named as specified? |
| 29 |
TEST=`grep $1 $DB_LIST` |
| 30 |
if [ "$TEST" = "" ]; then |
| 31 |
# This may become annoying. If so, comment it out! |
| 32 |
echo The database $1 does not exist. Sorry. |
| 33 |
echo The existing databases are: |
| 34 |
cat $DB_LIST |
| 35 |
else |
| 36 |
cat /dev/stdin >>$DB_BASE/$1/$1.urls |
| 37 |
fi |