mirror of
https://github.com/LionSec/katoolin.git
synced 2026-04-25 08:55:59 +03:00
[PR #198] Fault-tolerant package installation with bash for loop #343
Labels
No labels
pull-request
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
starred/katoolin-LionSec#343
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
📋 Pull Request Information
Original PR: https://github.com/LionSec/katoolin/pull/198
Author: @mkrupczak3
Created: 6/2/2019
Status: 🔄 Open
Base:
master← Head:master📝 Commits (3)
f349defchanged apt install from list of pkgs to for loop of pkgs6fc1c83fix syntax error by removing && after for loop done26f1d68fix typo📊 Changes
1 file changed (+65 additions, -65 deletions)
View changed files
📝
katoolin.py(+65 -65)📄 Description
Scenario:
In the current version, if any singular package to be installed is missing or can't be found, the entire installation (including all other packages) will fail. This is because if apt-get is given a list of packages and one can't be installed, it assumes the entire command is invalid and shuts down.
Fix:
Instead of passing apt-get a list of packages to be installed, instead use a for loop to iterate over a list, installing each package by itself individually. This is much more robust, and if any individual install fails it has no effect on any other package installs. I've used this technique in my own install scripts to great success: https://github.com/mkrupczak3/gettools
Note:
Due to my IDE settings a bunch of whitespace has been mangled. My first change is on line 302, and any further changes are on any lines that have "opcion 2 == "0"" on them.
@LionSec Really like this tool, thanks!
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.