Browse Source

Make sure --no-download was actually --download-only :)

master
freesource 23 years ago
parent
commit
fd5e159bb8
  1. 18
      SWIM/Safex.pm
  2. 28
      swim

18
SWIM/Safex.pm

@ -69,7 +69,7 @@ sub safex {
if (($argument =~ m,/, && ($commands->{"y"} ||
$commands->{"z"} ||
$commands->{"ftp"} ||
$commands->{"no-download"})) ||
$commands->{"download-only"})) ||
defined $aptor_group ||
$commands->{"ftp"} ||
$commands->{"purge"} ||
@ -93,7 +93,7 @@ sub safex {
if ($commands->{"y"} ||
$commands->{"z"} ||
$commands->{"ftp"} ||
$commands->{"no-download"} ||
$commands->{"download-only"} ||
$commands->{"purge"} ||
$commands->{"remove"} ||
$commands->{"r"} ||
@ -221,7 +221,7 @@ sub xyz {
if (($commands->{"y"} ||
$commands->{"z"} ||
$commands->{"x"} ||
$commands->{"no-download"}) &&
$commands->{"download-only"}) &&
($commands->{"ftp"})) {
@ -229,7 +229,7 @@ sub xyz {
print "x" if $commands->{"x"};
print "y" if $commands->{"y"};
print "z" if $commands->{"z"};
print " --no-download" if $commands->{"no-download"};
print " --download-only" if $commands->{"download-only"};
print " cannot be used with ";
#print "--purge " if defined $commands->{"purge"};
print "--ftp " if defined $commands->{"ftp"};
@ -251,7 +251,7 @@ sub xyz {
print " cannot be used without --ftp\n";
exit;
}
if (($commands->{"y"} || $commands->{"z"} || $commands->{"no-download"}) &&
if (($commands->{"y"} || $commands->{"z"} || $commands->{"download-only"}) &&
!$commands->{"x"}) {
print "swim: requires -x option\n";
exit;
@ -294,7 +294,7 @@ sub xyz {
) &&
!($commands->{"z"} || $commands->{"no-download"}) ) {
!($commands->{"z"} || $commands->{"download-only"}) ) {
my $arg;
my $count = 0;
@ -353,7 +353,7 @@ sub xyz {
# SAFETY MODE DOWNLOAD-ONLY #
#############################
# --download-only and simulate
elsif ($commands->{"no-download"} && !$commands->{"z"} ) {
elsif ($commands->{"download-only"} && !$commands->{"z"} ) {
my $arg;
my $count = 0;
@ -455,7 +455,7 @@ sub xyz {
if (!($commands->{"ftp"} || $commands->{"purge"} ||
$commands->{"reinstall"})) {
if (!$commands->{"y"}) {
if (!$commands->{"no-download"}) {
if (!$commands->{"download-only"}) {
!($commands->{"r"} || $commands{"remove"}) ?
system "$apt_get install $arg" :
system "$apt_get remove $arg";
@ -467,7 +467,7 @@ sub xyz {
}
}
else {
if (!$commands->{"no-download"}) {
if (!$commands->{"download-only"}) {
!($commands->{"r"} || $commands{"remove"}) ?
system "$apt_get install -y $arg" :
system "$apt_get remove -y $arg";

28
swim

@ -138,7 +138,7 @@ my($result) =
"x", # simulate apt's actions
"y", # automatic yes for -z
"z", # apt install
"no-download", # apt download
"download-only", # apt download
"source", # ftp source and package
"source_only", # ftp only source for package
"diff", # just grab diff for source
@ -1728,12 +1728,12 @@ Usage: swim [--nopager -n]
swim {--search ? (--research || --refinesearch) <pattern(s)>}
[-g] [-n] [--dbpath <dir>] [--root <dir>] [--no]
[--arch <architecture>] [--dists <distribution>]
[-xyrz --remove ? <[--no-download]>] [--stdin]
[-xyrz --remove ? <[--download-only]>] [--stdin]
[--purge] [--reinstall] [<\\d{1,}>]
swim {--powersearch --ps ? (--research || --refinesearch) <pattern(s)>}
[-n] [--dir] [--dbpath <dir>] [--root <dir>] [--no]
[--arch <architecture>] [--dists <distribution>]
[-xyrz --remove ? <[--no-download]>] [--stdin]
[-xyrz --remove ? <[--download-only]>] [--stdin]
[--purge] [--reinstall] [<\\d{1,}>]
swim {--query -q} [-afpgn --dir] [--total -t] [-i] [-l ? <[--df]>]
[-d] [-c] [--scripts] [--preinst] [--postinst]
@ -1745,7 +1745,7 @@ Usage: swim [--nopager -n]
[--copyright] [--changelog] [--allgroups]
[--arch <architecture>] [--dists <distribution>]
[--stdin] [--extract <ALL|archive|PWD!archive>]
[-xyrz --remove ? <[--no-download]>] [--purge] [--reinstall]
[-xyrz --remove ? <[--download-only]>] [--purge] [--reinstall]
[targets | -S ? <\\d{1,}>]
swim {--audit --status -C}
swim {--apt} [--update] [--clean] [--autoclean] [--check]
@ -1800,12 +1800,12 @@ Usage: swim [--nopager -n]
swim {--search ? (--research || --refinesearch) <pattern(s)>}
[-g] [-n] [--dbpath <dir>] [--root <dir>] [--no]
[--arch <architecture>] [--dists <distribution>]
[-xyrz --remove ? <[--no-download]>] [--stdin]
[-xyrz --remove ? <[--download-only]>] [--stdin]
[--purge] [--reinstall] [<\\d{1,}>]
swim {--powersearch --ps ? (--research || --refinesearch) <pattern(s)>}
[-n] [--dir] [--dbpath <dir>] [--root <dir>] [--no]
[--arch <architecture>] [--dists <distribution>]
[-xyrz --remove ? <[--no-download]>] [--stdin]
[-xyrz --remove ? <[--download-only]>] [--stdin]
[--purge] [--reinstall] [<\\d{1,}>]
swim {--query -q} [-afpgn --dir] [--total -t] [-i] [-l ? <[--df]>]
[-d] [-c] [--scripts] [--preinst] [--postinst]
@ -1817,7 +1817,7 @@ Usage: swim [--nopager -n]
[--copyright] [--changelog] [--allgroups]
[--arch <architecture>] [--dists <distribution>]
[--stdin] [--extract <ALL|archive|PWD!archive>]
[-xyrz --remove ? <[--no-download]>] [--purge] [--reinstall]
[-xyrz --remove ? <[--download-only]>] [--purge] [--reinstall]
[targets | -S ? <\\d{1,}>]
swim {--audit --status -C}
swim {--apt} [--update] [--clean] [--autoclean] [--check]
@ -1921,7 +1921,7 @@ usage:
-x - simulate apt-get installation
-y - answer yes to all apt-get prompts
-z - get and install package using apt-get
--no-download - only download package when using apt-get
--download-only - only download package when using apt-get
--purge - remove the installed package, and the
package's configuration files
--remove
@ -1959,7 +1959,7 @@ usage:
-x - simulate apt-get installation
-y - answer yes to all apt-get prompts
-z - get and install package using apt-get
--no-download - only download package when using apt-get
--download-only - only download package when using apt-get
--ftp - download package
--source - download source package
--source_only - only download source package
@ -2132,13 +2132,13 @@ Usage: swim [--nopager -n]
[-g] [-n] [--dbpath <dir>] [--root <dir>] [--no]
[--arch <architecture>] [--dists <distribution>]
[--ftp ? --source | --source_only ? <[--diff]>]
[-xyrz --remove ? <[--no-download]>] [--stdin] [--apt2df]
[-xyrz --remove ? <[--download-only]>] [--stdin] [--apt2df]
[--df2apt] [--purge] [--reinstall] [<\\d{1,}>]
swim {--powersearch --ps ? (--research || --refinesearch) <pattern(s)>}
[-n] [--dir] [--dbpath <dir>] [--root <dir>] [--no]
[--arch <architecture>] [--dists <distribution>]
[--ftp ? --source | --source_only <[--diff]>]
[-xyrz --remove ? <[--no-download]>] [--stdin] [--apt2df]
[-xyrz --remove ? <[--download-only]>] [--stdin] [--apt2df]
[--df2apt] [--purge] [--reinstall] [<\\d{1,}>]
swim {--query -q} [-afpgn --dir] [--total -t] [-i] [-l ? <[--df]>]
[-d] [-c] [--scripts] [--preinst] [--postinst]
@ -2150,7 +2150,7 @@ Usage: swim [--nopager -n]
[--arch <architecture>] [--dists <distribution>]
[--ftp ? --source | --source_only ? <[--diff]>]
[--stdin] [--extract <ALL|archive|PWD!archive>]
[-xyrz --remove ? <[--no-download]>] [--purge] [--reinstall] [--apt2df]
[-xyrz --remove ? <[--download-only]>] [--purge] [--reinstall] [--apt2df]
[--df2apt] [targets | -S ? <\\d{1,}>]
swim {--audit --status -C}
swim {--ftp} [--Contents <DF|directory>] [--Packages <DF|directory>]
@ -2267,7 +2267,7 @@ usage:
-x - simulate apt-get installation
-y - answer yes to all apt-get prompts
-z - get and install package using apt-get
--no-download - only download package when using apt-get
--download-only - only download package when using apt-get
--ftp - download package
--source - download source package
--source_only - only download source package
@ -2309,7 +2309,7 @@ usage:
-x - simulate apt-get installation
-y - answer yes to all apt-get prompts
-z - get and install package using apt-get
--no-download - only download package when using apt-get
--download-only - only download package when using apt-get
--ftp - download package
--source - download source package
--source_only - only download source package

Loading…
Cancel
Save