mirror of
https://github.com/fspc/dswim.git
synced 2025-02-22 16:43:23 -05:00
The logic is now correct for the new option --reinstall.
This commit is contained in:
parent
c11a9f510b
commit
60d41817a4
@ -171,8 +171,10 @@ sub xyz {
|
|||||||
print "\n";
|
print "\n";
|
||||||
exit;
|
exit;
|
||||||
}
|
}
|
||||||
if (($commands->{"r"} || $commands->{"remove"}) && $commands->{"purge"} &&
|
if ((($commands->{"r"} || $commands->{"remove"}) && $commands->{"purge"}) ||
|
||||||
$commands->{"reinstall"}) {
|
(($commands->{"r"} || $commands->{"remove"}) && $commands->{"reinstall"})
|
||||||
|
|| ($commands->{"reinstall"} && $commands->{"purge"})
|
||||||
|
) {
|
||||||
print "swim: ";
|
print "swim: ";
|
||||||
print "-r " if defined $commands->{"r"};
|
print "-r " if defined $commands->{"r"};
|
||||||
print "--remove " if defined $commands->{"remove"};
|
print "--remove " if defined $commands->{"remove"};
|
||||||
@ -271,11 +273,20 @@ sub xyz {
|
|||||||
history_print($arg,\%commands);
|
history_print($arg,\%commands);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
!($commands->{"r"} || $commands{"remove"}) ?
|
|
||||||
system "$apt_get install -qs $arg" :
|
if ( $commands->{"r"} || $commands{"remove"} ) {
|
||||||
system "$apt_get remove -qs $arg";
|
system "$apt_get remove -qs $arg";
|
||||||
system "$apt_get --purge remove -qs $arg" if $commands->{"purge"};
|
}
|
||||||
system "$apt_get --reinstall install -qs $arg" if $commands->{"reinstall"};
|
elsif ( $commands->{"purge"} ) {
|
||||||
|
system "$apt_get --purge remove -qs $arg";
|
||||||
|
}
|
||||||
|
elsif ( $commands->{"reinstall"} ) {
|
||||||
|
system "$apt_get --reinstall install -qs $arg";
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
system "$apt_get install -qs $arg";
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
#####################
|
#####################
|
||||||
|
Loading…
x
Reference in New Issue
Block a user