Switch release tarball to xz format
[clawsker.git] / clawsker
index 04c1995376f6eb40fc600a6f3fac2bb57559dd4c..751c64450204710d1e1098653459cf98325205a8 100755 (executable)
--- a/clawsker
+++ b/clawsker
@@ -1,7 +1,7 @@
 #!/usr/bin/perl -w
 #
 # Clawsker :: A Claws Mail Tweaker
-# Copyright 2007-2014 Ricardo Mones <ricardo@mones.org>
+# Copyright 2007-2015 Ricardo Mones <ricardo@mones.org>
 #
 # This program is free software: you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
@@ -375,11 +375,13 @@ sub claws_is_running {
 }
 
 sub check_claws_not_running {
-    my $socket = (not $ALTCONFIGDIR)? "/tmp/": $CONFIGDIR;
-    $socket .= "claws-mail-$<";
+    my $tmpdir = (defined $ENV{TMPDIR})? $ENV{TMPDIR}: '/tmp';
+    $tmpdir = '/tmp' if ($tmpdir eq '');
+    my $socket = (not $ALTCONFIGDIR)? $tmpdir: $CONFIGDIR;
+    $socket .= "/claws-mail-$<";
     -S $socket and return claws_is_running ();
     # since 3.9.0cvs36
-    my $lockdir = "/tmp/claws-mail-$<";
+    my $lockdir = "$tmpdir/claws-mail-$<";
     -d $lockdir and do { 
        $_ = $CONFIGDIR;
        s/\/$//;
@@ -1932,7 +1934,7 @@ sub opt_alternate_config_dir {
 
 sub opt_clawsrc {
     my ($name, $value) = @_;
-    die _("Error: '{value}' is not a file or does not exist", value => $value)
+    die _("Error: '{value}' is not a file or does not exist\n", value => $value)
         unless -f $value;
     set_rc_filename ($value);
 }
@@ -2025,7 +2027,7 @@ GNU General Public License for more details.
 
 You should have received a copy of the GNU General Public License
 along with this program.  If not, see &lt;http://www.gnu.org/licenses/&gt;.";
-    my $year = "2007-2014";
+    my $year = "2007-2015";
     my $holder = "Ricardo Mones &lt;ricardo\@mones.org&gt;";
     my $url = "http://www.claws-mail.org/clawsker.php";