]> mj.ucw.cz Git - gallery.git/commitdiff
Gallery2: Let mj-digikam call mj-init if needed
authorMartin Mares <mj@ucw.cz>
Sat, 29 Dec 2012 11:43:36 +0000 (12:43 +0100)
committerMartin Mares <mj@ucw.cz>
Sun, 8 Feb 2015 20:14:16 +0000 (21:14 +0100)
gal2/bin/gal-mj-digikam

index 134bfc0df3fee04c0f0a37efbb000ec0712f44aa..776c5b990bc2b67d75d9fc718bf89ee158749570 100755 (executable)
@@ -15,6 +15,10 @@ if (!defined $album) {
        $album = $1;
 }
 
+if (! -f "gallery.cf") {
+       system 'gal', 'init'; die if $?;
+}
+
 my $dbfile = "$photos_root/digikam4.db";
 my $dbh = DBI->connect("dbi:SQLite:dbname=$dbfile", "", "") or die "Cannot access $dbfile\n";