1
0
mirror of https://github.com/fspc/dswim.git synced 2025-02-22 08:33:24 -05:00

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

This commit is contained in:
freesource 2001-10-19 04:36:47 +00:00
parent 2f2e86fe5f
commit fd5e159bb8
2 changed files with 23 additions and 23 deletions

View File

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

28
swim
View File

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