#!/usr/bin/perl -w use English; use strict; # location of tar files my $loc = "/usr/local/files"; ##################################### # Enter the eggdrop versions below # ##################################### my $optone = "eggdrop1.6.12"; my $opttwo = "eggdrop1.6.10"; ##################################### sub menu { my $warn = "\nPlease ignore any messages below this line, if an error does appear, \nfeel free to report it to your friendly speedshellz administrators.\n\n==================================================\n\n"; my $message = "\n==================================================\n\nAll Done. Now please feel free to edit your eggdrop.conf\n"; &clear; print "\n"; print "1. $optone\n"; print "2. $opttwo\n"; print "\n0. Exit\n"; print "\nPlease enter one of the above numbers to install (1-2): "; my $choice = ; chomp($choice); if ($choice == 1) { &clear; print "\n\nCopying over $optone\n"; system("cp $loc/$optone" . ".tar.gz ~/"); print "Now untarring $optone\n"; chdir(); system("tar zxf $optone" . ".tar.gz"); print $warn; print $message; system("rm $optone" . ".tar.gz"); &continue; &sleep; } elsif ($choice == 2) { &clear; print "\n\nCopying over $opttwo\n"; system("cp $loc/$opttwo" . ".tar.gz ~/"); print "Now untarring $opttwo\n"; chdir(); system("tar zxf $opttwo" . ".tar.gz"); print $warn; print $message; system("rm $opttwo" . ".tar.gz"); &continue; &sleep; } elsif ($choice == 0) { print "\nThanks for using 'installegg'\n\n"; exit(0); } else { print "\nYou have entered an invalid entry, please try again.\n"; &sleep; }; } sub clear { system("clear"); } sub continue { print "\nWould you like to continue? [yes/no]: "; my $yesno = ; if ($yesno =~ /y/) { print "Good choice!\n"; } elsif ($yesno =~ /n/) { print "Ok, Goodbye!\n\n"; exit(0); } } sub sleep { sleep(3); } &menu; do { &menu; } until my $choice == 0;