Permalink
Browse files

die more

  • Loading branch information...
1 parent 854da02 commit 4db0c5595bfe364b20d815d0cc1b83dbde4dfd86 @tadzik tadzik committed Feb 6, 2011
Showing with 6 additions and 11 deletions.
  1. +6 −11 simpleburner.pl
View
@@ -93,21 +93,18 @@ sub programcheck {
$writer = 'cdrecord';
$isomaker = 'mkisofs';
} else {
- print("Not found: Please install cdrkit or cdrtools!\n");
- exit 1;
+ die("Not found: Please install cdrkit or cdrtools!\n");
}
};
}
sub optcheck {
unless ($burn or $datadir) {
- print("Failed! You must define --data option.\n"
- ."Run -h|--help for more information.\n");
- exit 1;
+ die("Failed! You must define --data option.\n"
+ ."Run -h|--help for more information.\n");
}
unless (-d $datadir) {
- print("Failed! Data directory '$datadir' does not exist.\n");
- exit 1;
+ die("Failed! Data directory '$datadir' does not exist.\n");
}
}
@@ -127,8 +124,7 @@ sub makeiso {
sub burniso {
try "Burning iso...", do {
- my $burnspeed = "";
- my $runtest = "";
+ my ($burnspeed, $runtest);
if ($speed) {
$burnspeed = " --speed=$speed";
} elsif ($test) {
@@ -147,8 +143,7 @@ sub oldisock {
print("Burn it? [Y/n] ");
my $reply = <STDIN>; chomp $reply;
if ($reply eq "n") {
- print("Stopped!\n");
- exit 1;
+ die("Stopped!\n");
} else {
burniso();
exit 0;

0 comments on commit 4db0c55

Please sign in to comment.