summaryrefslogtreecommitdiffstats
path: root/perl-install
diff options
context:
space:
mode:
authorPascal Rigaux <pixel@mandriva.com>2002-12-03 12:26:24 +0000
committerPascal Rigaux <pixel@mandriva.com>2002-12-03 12:26:24 +0000
commit3ea0f2dda653d67df19ca19189b6eb7fa94b93b6 (patch)
tree0e1e0c06ceacec93e97d5fe644f1bfa5ec3ef9f0 /perl-install
parent2570c198b040d0af85178f4a69fee48563a3ea39 (diff)
downloaddrakx-backup-do-not-use-3ea0f2dda653d67df19ca19189b6eb7fa94b93b6.tar
drakx-backup-do-not-use-3ea0f2dda653d67df19ca19189b6eb7fa94b93b6.tar.gz
drakx-backup-do-not-use-3ea0f2dda653d67df19ca19189b6eb7fa94b93b6.tar.bz2
drakx-backup-do-not-use-3ea0f2dda653d67df19ca19189b6eb7fa94b93b6.tar.xz
drakx-backup-do-not-use-3ea0f2dda653d67df19ca19189b6eb7fa94b93b6.zip
remove pack_ and unpack_ (unused)
Diffstat (limited to 'perl-install')
-rw-r--r--perl-install/commands.pm44
1 files changed, 2 insertions, 42 deletions
diff --git a/perl-install/commands.pm b/perl-install/commands.pm
index 9d45e58a7..e4b393f76 100644
--- a/perl-install/commands.pm
+++ b/perl-install/commands.pm
@@ -331,11 +331,11 @@ sub more {
require devices;
my $tty = devices::make('tty');
my $n = 0;
- local *IN; open IN, $tty or die "can't open $tty\n";
+ open my $IN, $tty or die "can't open $tty\n";
local $_;
while (<>) {
if (++$n == 25) {
- my $v = <IN>;
+ my $v = <$IN>;
$v =~ /^q/ and exit 0;
$n = 0;
}
@@ -343,46 +343,6 @@ sub more {
}
}
-sub pack_ {
- my $t;
- foreach (@_) {
- if (-d $_) {
- pack_(glob_($_));
- } else {
- print -s $_, "\n";
- print $_, "\n";
-
- local *F;
- open F, $_ or die "can't read file $_: $!\n";
- while (read F, $t, $BUFFER_SIZE) { print $t }
- }
- }
-}
-
-sub unpack_ {
- my $t;
- @_ == 1 or die "give me one and only one file to unpack\n";
- local *F;
- open F, $_[0] or die "can't open file $_: $!\n";
- while (1) {
- my $size = chomp_(scalar <F>);
- defined $size or last;
- $size =~ /^\d+$/ or die "bad format (can't find file size)\n";
- my $filename = chomp_(scalar <F>) or die "expecting filename\n";
-
- print "$filename\n";
- my $dir = dirname($filename);
- -d $dir or mkdir_p($dir);
-
- local *G;
- open G, "> $filename" or die "can't write file $filename: $!\n";
- while ($size) {
- $size -= read(F, $t, min($size, $BUFFER_SIZE)) || die "data for file $filename is missing\n";
- print G $t or die "error writing to file $filename: $!\n";
- }
- }
-}
-
sub insmod {
my ($h) = getopts(\@_, qw(h));
$h || @_ == 0 and die "usage: insmod <module> [options]\n";