aboutsummaryrefslogtreecommitdiffstats
path: root/packdrake
diff options
context:
space:
mode:
authorPascal Rigaux <pixel@mandriva.com>2000-09-15 10:55:17 +0000
committerPascal Rigaux <pixel@mandriva.com>2000-09-15 10:55:17 +0000
commitb6898a91bf508a10db8682c1e07666893a069c06 (patch)
treede2ea45e9718fd8a4db5af3ca6e6d4c5db9adc18 /packdrake
parentcae24bfca78cf360a9a85f0aa97436ce810d4da0 (diff)
downloadrpmtools-b6898a91bf508a10db8682c1e07666893a069c06.tar
rpmtools-b6898a91bf508a10db8682c1e07666893a069c06.tar.gz
rpmtools-b6898a91bf508a10db8682c1e07666893a069c06.tar.bz2
rpmtools-b6898a91bf508a10db8682c1e07666893a069c06.tar.xz
rpmtools-b6898a91bf508a10db8682c1e07666893a069c06.zip
use TMPDIR if availableodysseyOdyssey-rc1
Diffstat (limited to 'packdrake')
-rwxr-xr-xpackdrake8
1 files changed, 2 insertions, 6 deletions
diff --git a/packdrake b/packdrake
index 57b4acf..f801ad4 100755
--- a/packdrake
+++ b/packdrake
@@ -52,7 +52,6 @@
#- general information.
my $VERSION = "0.1";
my $default_size = 400000;
-my $default_tmpdir = "/tmp";
my $default_ratio = 6;
#- used for uncompressing archive and listing.
@@ -459,8 +458,6 @@ usage:
/bin/gzip or /usr/bin/bzip2.
--compress <cmd> - select compression command.
--uncompress <cmd> - select uncompression command.
- --tmpdir - select a specific tempory directory for operation,
- default to $default_tmpdir.
--extract <file> <dir> - extract archive <file> contents to directory <dir>,
specific file to extract are given on command line.
--uncompress <cmd> - override uncompression method in archive <file>.
@@ -471,7 +468,7 @@ usage:
}
sub main {
- my ($file, $mode, $dir, $size, $method, $compress, $uncompress, $tmpdir, $ratio);
+ my ($file, $mode, $dir, $size, $method, $compress, $uncompress, $ratio);
my @nextargv = (\$file);
my @list = ();
@@ -487,7 +484,6 @@ sub main {
/^--method$/ and do { push @nextargv, \$method; next };
/^--compress$/ and do { push @nextargv, \$compress; next };
/^--uncompress$/ and do { push @nextargv, \$uncompress; next };
- /^--tmpdir$/ and do { push @nextargv, \$tmpdir; next };
/^-(.*)$/ and do { foreach (split //, $1) {
/[1-9]/ and do { $ratio = $_; next };
/b/ and do { $mode and die $error_mode; $mode = "build"; @nextargv = (\$file); next };
@@ -505,9 +501,9 @@ sub main {
#- examine and lauch.
$mode =~ /cat/ or $file or die "packdrake: no archive filename given, check usage with --help\n";
$size ||= 400000;
- $tmpdir ||= "/tmp";
$ratio ||= 6;
+ $tmpdir = $ENV{TMPDIR} || "/tmp";
$tmpz = "$tmpdir/packdrake-tmp.$$";
unless ($method) {
$file =~ /\.cz$/ and $method = "gzip";