remove reading-dialog decollation remnants from UI
[scpubgit/stemmaweb.git] / script / maketestdb.pl
index db1b1e8..a662274 100755 (executable)
@@ -9,7 +9,13 @@ use Text::Tradition::Directory;
 my $DBDIR = 'db';
 my $DBNAME = 'traditions.db';
 my $DBEXT = 'test';
-# Delete the old directory if it exists
+# Make the directory on the filesystem if necessary
+unless( -d $DBDIR ) {
+       mkdir $DBDIR
+               or die "Could not make database director $DBDIR";
+       say "Created directory for test database";
+}
+# Delete the old db if it exists
 if( -f "$DBDIR/$DBNAME.$DBEXT" ) {
        unlink( "$DBDIR/$DBNAME.$DBEXT" );
 }
@@ -28,7 +34,7 @@ my $dir = Text::Tradition::Directory->new(
        extra_args => { create => 1 } 
        );
 my $scope = $dir->new_scope();
-say "Created test directory";
+say "Created test database";
 
 # Create users
 my $user = $dir->add_user({ username => 'user@example.org', password => 'UserPass' });
@@ -56,7 +62,6 @@ $t3->name( 'John verse' );
 $dir->store( $t3 );
 my $t4 = Text::Tradition->new( input => 'Self', file => 't/data/collatecorr.xml' );
 $t4->public( 1 );
-$t4->set_stemweb_jobid( '16' );
 $user->add_tradition( $t4 );
 $dir->store( $t4 );
 $dir->store( $user );