aboutsummaryrefslogtreecommitdiffstats
path: root/imapsync
diff options
context:
space:
mode:
authorGuilhem Moulin <guilhem@fripost.org>2015-07-23 20:12:38 +0200
committerGuilhem Moulin <guilhem@fripost.org>2015-07-23 20:12:38 +0200
commitc7e3736d35527593235ae12bf6e879689ea17f66 (patch)
tree8d28a61e9b28af750797479a2a89997a1aa066c9 /imapsync
parentb634b665a4a636460562ab0718770e0845da22a5 (diff)
Add a command-line option --config to specify the configuration file.
Diffstat (limited to 'imapsync')
-rwxr-xr-ximapsync4
1 files changed, 2 insertions, 2 deletions
diff --git a/imapsync b/imapsync
index 4ef47b3..a18e4cd 100755
--- a/imapsync
+++ b/imapsync
@@ -43,11 +43,11 @@ sub usage(;$) {
print STDERR "TODO $NAME usage\n";
exit $rv;
}
-usage(1) unless GetOptions(\%CONFIG, qw/debug help|h quiet|q oneshot|1/);
+usage(1) unless GetOptions(\%CONFIG, qw/debug help|h config=s quiet|q oneshot|1/);
usage(0) if $CONFIG{help};
-my $CONFFILE = 'sync.ini';
+my $CONFFILE = delete $CONFIG{config} // 'imapsync';
my $CACHEDIR = './imapsync.cache'; # XXX use a config option
my $DBFILE = "$CACHEDIR/imap.guilhem.org.db";
my $LOCKFILE = "$CACHEDIR/.imap.guilhem.org.lck";