Commit eec01dbe authored by Nigel Kukard's avatar Nigel Kukard

Merge branch 'move-configuration' into 'master'

Move ~/.awit-ssh.conf to ~/.config/awit-ssh.conf

See merge request !48
parents 7baab584 5d4b42db
Pipeline #3548 passed with stages
in 1 minute and 29 seconds
......@@ -234,16 +234,30 @@ my ($forwardHost,$forwardPort,$forwardUsername,@forwardPortExtra);
=head1 CONFIG FILE
The following options are read from C<~/.awit-ssh.conf>, each set of options is organized in an inifile [section].
The following options are read from C<~/.config/awit-ssh.conf> (or C<~/.awit-ssh.conf> for legacy installations), each set
of options is organized in an inifile [section].
=cut
my $configFile;
# Legacy configuration file location
if (-f $ENV{"HOME"}.'/.awit-ssh.conf') {
$configFile = $ENV{"HOME"}.'/.awit-ssh.conf';
}
# XDG Base Directory configuration file location
if (-f $ENV{"HOME"}.'/.config/awit-ssh.conf') {
$configFile = $ENV{"HOME"}.'/.config/awit-ssh.conf';
}
my %iniSetup;
# Check for config and read
my $configFile = $ENV{"HOME"}.'/.awit-ssh.conf';
if (! -f $configFile) {
if (!defined($configFile)) {
$configFile = $ENV{"HOME"}.'/.config/awit-ssh.conf';
print STDERR "No configuration file found. Please answer the questions below to generate it.\n\n";
tie %iniSetup, 'Config::IniFiles';
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment