From: lpsolit%gmail.com <> Date: Tue, 19 Aug 2008 04:29:28 +0000 (+0000) Subject: Bug 450609: Add OS detection in install-module.pl to make it refuse to run on Windows... X-Git-Tag: bugzilla-3.2rc2~91 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=42ef5ee48a2fe60fb4a4c461ac2ec5a868e97c5e;p=thirdparty%2Fbugzilla.git Bug 450609: Add OS detection in install-module.pl to make it refuse to run on Windows - Patch by Frédéric Buclin r=mkanat a=LpSolit --- diff --git a/install-module.pl b/install-module.pl index a0de6d70ae..ca99ac23dc 100644 --- a/install-module.pl +++ b/install-module.pl @@ -46,6 +46,13 @@ GetOptions(\%switch, 'all|a', 'upgrade-all|u', 'show-config|s', 'global|g', 'help|h'); pod2usage({ -verbose => 1 }) if $switch{'help'}; + +if (ON_WINDOWS) { + print "\nYou cannot run this script on Windows. Please follow instructions\n"; + print "given by checksetup.pl to install missing Perl modules.\n\n"; + exit; +} + pod2usage({ -verbose => 0 }) if (!%switch && !@ARGV); set_cpan_config($switch{'global'}); @@ -98,7 +105,8 @@ __END__ =head1 NAME -install-module.pl - Installs or upgrades modules from CPAN +install-module.pl - Installs or upgrades modules from CPAN. +This script does not run on Windows. =head1 SYNOPSIS