summaryrefslogtreecommitdiff
path: root/usr.sbin/pkg_add/pkg_info
diff options
context:
space:
mode:
authorMarc Espie <espie@cvs.openbsd.org>2004-08-06 08:14:53 +0000
committerMarc Espie <espie@cvs.openbsd.org>2004-08-06 08:14:53 +0000
commit8162137e1c032b1c66d32407d4c931a438dd77b2 (patch)
treeebfe95f44685a750de45e370a89fc78f3765f6fc /usr.sbin/pkg_add/pkg_info
parent9e0e935ac2008088b922975fc8cb4a5b1c2310fa (diff)
avoid pulling in OpenBSD::md5 and File::Copy if we can.
Diffstat (limited to 'usr.sbin/pkg_add/pkg_info')
-rw-r--r--usr.sbin/pkg_add/pkg_info31
1 files changed, 22 insertions, 9 deletions
diff --git a/usr.sbin/pkg_add/pkg_info b/usr.sbin/pkg_add/pkg_info
index 596eec13741..7b58bf3dd4c 100644
--- a/usr.sbin/pkg_add/pkg_info
+++ b/usr.sbin/pkg_add/pkg_info
@@ -1,6 +1,6 @@
#! /usr/bin/perl
# ex:ts=8 sw=4:
-# $OpenBSD: pkg_info,v 1.6 2004/08/06 08:06:01 espie Exp $
+# $OpenBSD: pkg_info,v 1.7 2004/08/06 08:14:52 espie Exp $
#
# Copyright (c) 2003-2004 Marc Espie <espie@openbsd.org>
#
@@ -21,7 +21,6 @@ use warnings;
use OpenBSD::PackageInfo;
use OpenBSD::PackageName;
use Getopt::Std;
-use File::Copy;
package main;
@@ -50,38 +49,52 @@ sub print_info
} else {
print $opt_p, "Information for ", $pkg, "\n\n" unless $opt_q;
if ($opt_c) {
+ require File::Copy;
+
print $opt_p, "Comment:\n" unless $opt_q;
- copy($dir.COMMENT, \*STDOUT);
+ File::Copy::copy($dir.COMMENT, \*STDOUT);
print "\n";
}
if ($opt_R && -f $dir.REQUIRED_BY) {
+ require File::Copy;
+
print $opt_p, "Required by:\n" unless $opt_q;
- copy($dir.REQUIRED_BY, \*STDOUT);
+ File::Copy::copy($dir.REQUIRED_BY, \*STDOUT);
print "\n";
}
if ($opt_d) {
+ require File::Copy;
+
print $opt_p, "Description:\n" unless $opt_q;
- copy($dir.DESC, \*STDOUT);
+ File::Copy::copy($dir.DESC, \*STDOUT);
print "\n";
}
if ($opt_D && -f $dir.DISPLAY) {
+ require File::Copy;
+
print $opt_p, "Install notice:\n" unless $opt_q;
- copy($dir.DISPLAY, \*STDOUT);
+ File::Copy::copy($dir.DISPLAY, \*STDOUT);
print "\n";
}
if ($opt_i && -f $dir.INSTALL) {
+ require File::Copy;
+
print $opt_p, "Install script:\n" unless $opt_q;
- copy($dir.INSTALL, \*STDOUT);
+ File::Copy::copy($dir.INSTALL, \*STDOUT);
print "\n";
}
if ($opt_k && -f $dir.DEINSTALL) {
+ require File::Copy;
+
print $opt_p, "De-Install script:\n" unless $opt_q;
- copy($dir.DEINSTALL, \*STDOUT);
+ File::Copy::copy($dir.DEINSTALL, \*STDOUT);
print "\n";
}
if ($opt_r && -f $dir.REQUIRE) {
+ require File::Copy;
+
print $opt_p, "Require script:\n" unless $opt_q;
- copy($dir.REQUIRE, \*STDOUT);
+ File::Copy::copy($dir.REQUIRE, \*STDOUT);
print "\n";
}
my $plist;