X-Git-Url: http://mj.ucw.cz/gitweb/?a=blobdiff_plain;ds=sidebyside;f=gal2%2Fgal-scan;h=2cccfe13c82c6f4e2cdc373cef03eb146c497bbb;hb=a6d0d32eec237d41a55b9e54b88969d156c3458f;hp=39dd6b0b831f9f6b22e02e0e19919ac3267a9985;hpb=bfa0d113c413c2431f72405623d79cbc7b0b40f2;p=gallery.git diff --git a/gal2/gal-scan b/gal2/gal-scan index 39dd6b0..2cccfe1 100755 --- a/gal2/gal-scan +++ b/gal2/gal-scan @@ -5,8 +5,9 @@ use strict; use warnings; -use lib '/home/mj/web/gal2'; -use UCW::Gallery; +use FindBin; +use lib $FindBin::Bin; +use UCW::Gallery qw(%CF); use File::Spec; use Image::EXIF; @@ -47,7 +48,7 @@ if (@ARGV) { } UCW::Gallery::LoadConfig; -my $orig_prefix = $UCW::Gallery::CF{'OrigDir'}; +my $orig_prefix = $CF{'OrigDir'}; $orig_prefix =~ m{/$} or $orig_prefix .= '/'; print "Scanning photos\n"; @@ -82,7 +83,7 @@ foreach my $f (@files) { file => $rel_name, id => $id, orientation => $o, - xfrm => $UCW::Gallery::CF{'ScanDefaultTransform'}, + xfrm => $CF{'ScanDefaultTransform'}, title => '', }; print "ori=$o\n";