Fix config path detection for install.pl.
authorThomas Hochstein <thh@inter.net>
Mon, 2 Sep 2013 04:44:32 +0000 (06:44 +0200)
committerThomas Hochstein <thh@inter.net>
Mon, 2 Sep 2013 10:17:27 +0000 (12:17 +0200)
Make use of $Path - which is set and checked
to display a correct 'newsfeeds' example - to
load our configuration from the correct location.

Signed-off-by: Thomas Hochstein <thh@inter.net>
install/install.pl

index 374d74b..4069bf5 100755 (executable)
@@ -36,12 +36,12 @@ GetOptions ('u|update=s' => \$OptUpdate,
             'V|version'  => \&ShowVersion) or exit 1;
 
 ### change working directory to .. (as we're in .../install)
             'V|version'  => \&ShowVersion) or exit 1;
 
 ### change working directory to .. (as we're in .../install)
-chdir dirname($0).'/..';
+chdir dirname($FullPath).'/..';
 my $Path = cwd();
 
 ### read configuration
 print("Reading configuration.\n");
 my $Path = cwd();
 
 ### read configuration
 print("Reading configuration.\n");
-my %Conf = %{ReadConfig($HomePath.'/newsstats.conf')};
+my %Conf = %{ReadConfig($Path.'/newsstats.conf')};
 
 ##### --------------------------------------------------------------------------
 ##### Database table definitions
 
 ##### --------------------------------------------------------------------------
 ##### Database table definitions
This page took 0.01236 seconds and 4 git commands to generate.