summaryrefslogtreecommitdiffstats
path: root/clerk.pl
diff options
context:
space:
mode:
authorRasmus Steinke <rasi@xssn.at>2017-08-04 10:35:03 +0200
committerRasmus Steinke <rasi@xssn.at>2017-08-04 10:35:03 +0200
commit7a52414ed1010d692154738e345ca3ef7fea877c (patch)
tree2753b80751196330e041097fc9d66361ca7da6bf /clerk.pl
parent116ed754478c98d80e5c6a4c63429891622a4738 (diff)
downloadperl-app-clerk-7a52414ed1010d692154738e345ca3ef7fea877c.tar.gz
perl-app-clerk-7a52414ed1010d692154738e345ca3ef7fea877c.tar.xz
create tmp directory if it does not exist
Diffstat (limited to 'clerk.pl')
-rwxr-xr-xclerk.pl2
1 files changed, 2 insertions, 0 deletions
diff --git a/clerk.pl b/clerk.pl
index a00ea98..76e5f54 100755
--- a/clerk.pl
+++ b/clerk.pl
@@ -13,6 +13,7 @@ use Data::MessagePack;
use DDP;
use File::Basename;
use File::stat;
+use File::Path qw(make_path);
use File::Slurper 'read_binary';
use Getopt::Std;
use IO::Select;
@@ -22,6 +23,7 @@ use Net::MPD;
$ENV{TMUX_TMPDIR}='/tmp/clerk/tmux';
my $tmux_config='/etc/clerk/tmux.conf';
+make_path($ENV{TMUX_TMPDIR}) unless(-d $ENV{TMUX_TMPDIR});
my $config_file = $ENV{'HOME'} . "/.config/clerk/clerk.conf";