Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions bin/mkdir
Original file line number Diff line number Diff line change
Expand Up @@ -18,12 +18,9 @@ use File::Basename qw(basename);
use File::Spec;
use Getopt::Std qw(getopts);

our $VERSION = '1.6';
our $VERSION = '1.7';
my $Program = basename($0);

$SIG{__WARN__} = sub { warn "$Program: @_\n" };
$SIG{__DIE__} = sub { die "$Program: @_\n" };

my %options;
getopts('m:p', \%options) or usage();
usage() unless @ARGV;
Expand All @@ -32,6 +29,9 @@ use constant EX_SUCCESS => 0;
use constant EX_ERROR => 1;
use constant EX_USAGE => 2;

$SIG{__WARN__} = sub { print { *STDERR } "$Program: @_" };
$SIG{__DIE__} = sub { print { *STDERR } "$Program: @_"; exit EX_ERROR };

sub VERSION_MESSAGE {
print "$Program version $VERSION\n";
exit EX_SUCCESS;
Expand Down
Loading