X-Git-Url: http://www.average.org/gitweb/?p=mkgallery.git;a=blobdiff_plain;f=mkgallery.pl;h=4042863e34e47e3ea79515287b9bcb8084651c40;hp=bdd9a4a7111a9ba372794971d266ce874c6a740f;hb=e5d0bdd75f83caf895aa3dbe58f24ab9df48e670;hpb=1b45c1f055e04ed649d321d002d44b0f55d7fc08 diff --git a/mkgallery.pl b/mkgallery.pl index bdd9a4a..4042863 100755 --- a/mkgallery.pl +++ b/mkgallery.pl @@ -89,7 +89,7 @@ sub help { print STDERR <<__END__; usage: $0 [options] --help: print help message and exit - --incpath: do not try to find .gallery2 diretory upstream, use + --incpath: do not try to find .gallery2 directory upstream, use specified path (absolute or relavive). Use with causion. --debug: print a lot of debugging info to stdout as you run --asktitle: ask to edit album titles even if there are ".title" files @@ -189,28 +189,22 @@ sub initrss { my $fullpath=$self->{-fullpath}; my $toppath=$self->{-toppath}; my $inc=$self->{-inc}.$incdir.'/'; - my $conffile=$toppath.'/'.$incdir.'/rss.conf'; + my $conffile=$toppath.'/'.$incdir.'/feed.conf'; my $CONF; - if ($feed) { - if (open($CONF,">".$conffile)) { - print $CONF "file: ",$feed,"\n"; - close($CONF); + if (! $incpath) { + if ($feed) { + if (open($CONF,">".$conffile)) { + print $CONF $feed,"\n"; + close($CONF); + } else { + print STDERR "could not open $conffile: $!\n"; + } } else { - print STDERR "could not open $conffile: $!\n"; - } - } else { - if (open($CONF,$conffile)) { - my $ln=<$CONF>; - close($CONF); - chop $ln; - my ($k,$v)=split(':', $ln); - $k =~ s/^\s*//; - $k =~ s/\s*$//; - $v =~ s/^\s*//; - $v =~ s/\s*$//; - if ($k eq 'file') { - $feed=$v; + if (open($CONF,$conffile)) { + $feed=<$CONF>; + close($CONF); + chop $feed; } } }