Browse Source

This puts default_directory in $HOME.

master
freesource 23 years ago
parent
commit
52ebd92ce2
  1. 4
      SWIM/Conf.pm
  2. 8
      SWIM/MD.pm

4
SWIM/Conf.pm

@ -29,7 +29,7 @@ use Exporter;
$splt $mv $imswim $swim_conf $debug $port $timeout
$firewall $passive $apt_sources $HISTORY $alt);
%EXPORT_TAGS = (
Path => [ qw($tmp $parent $base $library) ],
Path => [ qw($tmp $parent $base $library $default_directory) ],
Deb => [ qw($pwd $dpkg_deb $ar $tar $grep $tmp $md5sum $cat $mv) ],
Qftp => [ qw($default_root_directory $permission @FTP
$default_directory $swim_conf) ],
@ -127,7 +127,7 @@ $alt = "debian";
# own choice.
# Naming Convention: Contents = Contents-dist.gz
# Packages = Packages-arch-dist-section.gz
$default_directory = '/root/.swim';
$default_directory = $main::home . "/.swim";
# The default root directory is the key to easy management of packages

8
SWIM/MD.pm

@ -54,7 +54,7 @@ sub process_md {
my $count1 = 1;
my($place) = finddb(\%commands);
$place = "$main::home$place";
$place = "$default_directory$place";
# Let's determine what architecture and distribution this person is
# interested in.
@ -106,11 +106,11 @@ sub process_md {
if (($commands->{"dbpath"} && $commands->{"root"}) ||
($commands->{"dbpath"} && !$commands->{"root"}) ||
(!$commands->{"dbpath"} && !$commands->{"root"})) {
$zing = tie %md, 'DB_File',"$main::home$parent$library/$fileindex$arch$dist.deb"
$zing = tie %md, 'DB_File',"$default_directory$parent$library/$fileindex$arch$dist.deb"
or die "DB_File: $!";
}
elsif (!$commands->{"dbpath"} && $commands->{"root"}) {
$zing = tie %md, 'DB_File',"$main::home$parent$base/$fileindex$arch$dist.deb"
$zing = tie %md, 'DB_File',"$default_directory$parent$base/$fileindex$arch$dist.deb"
or die "DB_File: $!";
}
while ($count <= $#mi) {
@ -221,7 +221,7 @@ sub process_md {
my @statusindex = split(/\s/,$nsb{"/."});
if ($#fileindex < $#statusindex) {
my $place = finddb(\%commands);
$place = "$main::home$place";
$place = "$default_directory$place";
open(DIFF, ">$place/.packagesdiff$arch$dist.deb")
or warn "couldn't create diff file\n";
my %uniques;

Loading…
Cancel
Save