SVN: toys/rsget.pl/rsget.pl
sparky
sparky at pld-linux.org
Sun Jul 11 21:04:03 CEST 2010
Author: sparky
Date: Sun Jul 11 21:04:03 2010
New Revision: 11647
Modified:
toys/rsget.pl/rsget.pl
Log:
- look for config file in $XDG_CONFIG_HOME/rsget.pl if directory exists,
defaults to $HOME/.rsget.pl otherwise
Modified: toys/rsget.pl/rsget.pl
==============================================================================
--- toys/rsget.pl/rsget.pl (original)
+++ toys/rsget.pl/rsget.pl Sun Jul 11 21:04:03 2010
@@ -19,7 +19,10 @@
unshift @INC, $install_path;
my $cdir = "$ENV{HOME}/.rsget.pl";
+my $xdgdir = ( $ENV{XDG_CONFIG_HOME} || "$ENV{HOME}/.config" ) . "/rsget.pl";
+$cdir = $xdgdir if -d $xdgdir;
$cdir = $ENV{RSGET_DIR} if $ENV{RSGET_DIR};
+
$ENV{RSGET_DIR} = $cdir;
read_config( "$cdir/config" );
More information about the pld-cvs-commit
mailing list