Permalink
Browse files

Please welcome oldisock! [;

  • Loading branch information...
1 parent 9a2cff8 commit 6163354da874134d51fec760c6a6324fff9a6429 Marcin Karpezo committed Jan 2, 2010
Showing with 21 additions and 20 deletions.
  1. +21 −20 simpleburner.pl
View
@@ -103,24 +103,6 @@ sub optcheck {
}
}
-sub oldisock {
- print("Old iso file detected, delete it? [Y/n] "); my $reply=<STDIN>; chomp $reply;
- if ($reply eq "n") {
- print("Burn it? [Y/n] "); my $reply=<STDIN>; chomp $reply;
- if ($reply eq "n") {
- print("Stopped!\n");
- exit 1;
- } else {
- &burniso;
- exit 0;
- }
- } else {
- print("Deleting old iso file...");
- unlink($isoname);
- print("[OK]\n");
- }
-}
-
sub makeiso {
if (-e $isoname) {
&oldisock;
@@ -152,6 +134,26 @@ sub burniso {
print("[OK!]\n");
}
+sub oldisock {
+ print("Old iso file detected, delete it? [Y/n] "); my $reply=<STDIN>; chomp $reply;
+ if ($reply eq "n") {
+ print("Burn it? [Y/n] "); my $reply=<STDIN>; chomp $reply;
+ if ($reply eq "n") {
+ print("Stopped!\n");
+ exit 1;
+ } else {
+ &burniso;
+ exit 0;
+ }
+ } else {
+ print("Deleting old iso file...");
+ unlink($isoname);
+ print("[OK]\n");
+ &makeiso;
+ &burniso;
+ }
+}
+
if ($isoname =~ m/^~/) {
$isoname =~ s/^~/$ENV{'HOME'}/;
}
@@ -170,8 +172,7 @@ sub burniso {
&optcheck;
} else {
&optcheck;
- &makeiso;
- &burniso;
+ &oldisock;
}
#TODO:

0 comments on commit 6163354

Please sign in to comment.