Skip to content
This repository was archived by the owner on Dec 10, 2021. It is now read-only.

Add pip and npm & better handle auxiliary PMs #18

Merged
merged 13 commits into from
Apr 23, 2021
Merged

Conversation

LoricAndre
Copy link
Contributor

No description provided.

@LoricAndre LoricAndre mentioned this pull request Apr 8, 2021
24 tasks
setup Outdated
@@ -266,6 +268,12 @@ superbbootstrap_AUR() {
fi
}

superbbootstrap_PIP() {
pip install pip --upgrade
Copy link
Contributor

@weiss-d weiss-d Apr 10, 2021

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In many Linux distros system Python has no pip module installed so the this command should be:

python3 -m ensurepip

And even if it does have pip module, it's executable could be not on the $PATH, so the package install command should look like this:

python3 -m pip install --upgrade <package_name>

The --upgrade option tells it not to reinstall the package if it is already installed.

@LoricAndre
Copy link
Contributor Author

8fcf7d4 should fix this.
I changed the way package managers are checked for using another PM_* variable : PM_check. This is a command that returns a status based on whether or not the package manager is available (in the case of pip, PIP_check="python -m ensurepip")

@LoricAndre
Copy link
Contributor Author

I understood something and switched back to the old way auxiliary PMs were handled. The PM_check variable was removed.

@NNBnh NNBnh added the enhancement New feature or request label Apr 10, 2021
setup Outdated
npm install npm@latest -g
}

superbbootstrap_PIP() {
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Opss, will fix to superbbootstrap_Python

PACKAGEMANAGER_LIST="$PACKAGEMANAGER_LIST Flatpak"
PACKAGEMANAGER_LIST="$PACKAGEMANAGER_LIST Homebrew"

PACKAGEMANAGER_LIST="$PACKAGEMANAGER_LIST Flatpak Homebrew"

if [ "$PACKAGEMANAGER_MAIN" = 'APT' ] || [ "$PACKAGEMANAGER_MAIN" = 'Pacman' ]; then
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

snap can only be install with apt and aur in all current supported package managers

setup Outdated
@@ -179,8 +185,6 @@ superbbootstrap_install_packages() {
fi

for packagemanager in $PACKAGEMANAGER_LIST; do
printf '\n\033[1;7;35m%s\033[0m\n' "Checking for packages from $packagemanager"
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This print is unnecessary because

eval "mark=\"\$${packagemanager}_MARK\""
eval "install_command=\"\$${packagemanager}_COMMAND\""

is not even take 1 second to runned.

@NNBnh NNBnh merged commit e8bdb32 into NNBnh:master Apr 23, 2021
# for free to subscribe to this conversation on GitHub. Already have an account? #.
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants