summaryrefslogtreecommitdiff
path: root/bin
diff options
context:
space:
mode:
Diffstat (limited to 'bin')
-rwxr-xr-xbin/mydbgen15
1 files changed, 12 insertions, 3 deletions
diff --git a/bin/mydbgen b/bin/mydbgen
index e78b025c9..717e5b29b 100755
--- a/bin/mydbgen
+++ b/bin/mydbgen
@@ -1,8 +1,9 @@
#!/bin/sh
#
+# $Id$
# Location of the .sql file with the schema
-DBFILE="data/tables.sql"
+DBSQL="tables.sql"
# Schema Version
SVER="1"
@@ -18,8 +19,16 @@ else
n="-n"
fi
-if [ ! -f $DBFILE ] ; then
- echo "Error: Required file $DBFILE is inaccessible!";
+# Fix for bug 10
+for try in HOME/services anope/data ../data data .. .
+do
+ if [ -f "$try/$DBSQL" ]; then
+ DBFILE="$try/$DBSQL"
+ fi
+done
+
+if [ ! -f "./$DBFILE" ] ; then
+ echo "Error: Required file $DBSQL was not found!";
exit
fi