summaryrefslogtreecommitdiff
path: root/installman
diff options
context:
space:
mode:
authorAbigail <abigail@abigail.be>2000-08-24 10:01:44 -0400
committerJarkko Hietaniemi <jhi@iki.fi>2000-08-24 18:17:22 +0000
commitb5f050109a35b826b378b939e1f6e4d803a85248 (patch)
tree928589ddf51e2d92225ae7f72ed0e79cbf6a8211 /installman
parentb449ee8683e17bf614409b74c32619260321dad1 (diff)
downloadperl-b5f050109a35b826b378b939e1f6e4d803a85248.tar.gz
More silencing of installman.
Message-ID: <20000824180144.20062.qmail@foad.org> p4raw-id: //depot/perl@6806
Diffstat (limited to 'installman')
-rwxr-xr-xinstallman15
1 files changed, 8 insertions, 7 deletions
diff --git a/installman b/installman
index 43c326006e..7c4314ba58 100755
--- a/installman
+++ b/installman
@@ -21,14 +21,15 @@ die "Patchlevel of perl ($patchlevel)",
$usage =
"Usage: installman --man1dir=/usr/wherever --man1ext=1
- --man3dir=/usr/wherever --man3ext=3
- --notify --help
+ --man3dir=/usr/wherever --man3ext=3
+ --notify --silent --help
Defaults are:
man1dir = $Config{'installman1dir'};
man1ext = $Config{'man1ext'};
man3dir = $Config{'installman3dir'};
man3ext = $Config{'man3ext'};
- --notify (or -n) just lists commands that would be executed.\n";
+ --notify (or -n) just lists commands that would be executed.
+ --silent (or -S) be silent. Only report errors.\n";
GetOptions( qw( man1dir=s man1ext=s man3dir=s man3ext=s notify n help silent S))
|| die $usage;
@@ -39,7 +40,7 @@ $man1dir = defined($opt_man1dir) ? $opt_man1dir : $Config{'installman1dir'};
$man1ext = defined($opt_man1ext) ? $opt_man1ext : $Config{'man1ext'};
$man3dir = defined($opt_man3dir) ? $opt_man3dir : $Config{'installman3dir'};
$man3ext = defined($opt_man3ext) ? $opt_man3ext : $Config{'man3ext'};
-$silent = $opt_silent || $opt_s;
+$silent = $opt_silent || $opt_S;
$notify = $opt_notify || $opt_n;
@@ -174,7 +175,7 @@ sub lsmodpods {
}
$packlist->write() unless $notify;
-warn " Installation complete\n";
+warn " Installation complete\n" unless $silent;
exit 0;
@@ -184,7 +185,7 @@ exit 0;
sub cmd {
local($cmd) = @_;
- warn " $cmd\n" unless $cmd;
+ warn " $cmd\n" unless $silent;
unless ($notify) {
if ($Config{d_fork}) {
fork ? wait : exec $cmd; # Allow user to ^C out of command.
@@ -215,7 +216,7 @@ sub link {
my($from,$to) = @_;
my($success) = 0;
- warn $silent ? " $to\n" : " ln $from $to\n";
+ warn " ln $from $to\n" unless $silent;
eval {
CORE::link($from, $to)
? $success++