feat(dfm): install pip/python packages

This commit is contained in:
2023-09-19 08:47:45 +03:00
parent 7769af68b5
commit d61f53196d
2 changed files with 30 additions and 0 deletions

View File

@@ -41,6 +41,7 @@ function section_install
"nvm:Install Node Version Manager (nvm)"
"npm:Install NPM Packages"
"ntfy:Install ntfy"
"pip:Install pip/python packages"
"z:Install z"
)
@@ -49,6 +50,7 @@ function section_install
$0 install macos
$0 install antigen
$0 brew install
$0 install pip
$0 install cargo
$0 install composer
$0 install dotenv
@@ -132,6 +134,10 @@ function section_install
bash "$DOTFILES/scripts/install-ntfy.sh" \
&& msg_yay "ntfy installed!"
;;
pip)
bash "$DOTFILES/scripts/install-pip-packages.sh" \
&& msg_yay "pip/python packages installed!"
;;
z)
bash "$DOTFILES/scripts/install-z.sh" \
&& msg_yay "z has been installed!"

24
scripts/install-pip-packages.sh Executable file
View File

@@ -0,0 +1,24 @@
#!/usr/bin/env bash
# Install python/pip packages.
#
# shellcheck source=shared.sh
source "$HOME/.dotfiles/scripts/shared.sh"
! have pip && {
msg_err "Could not find pip, something really terrible is going on." && exit 1
}
packages=(
"libtmux"
)
for pkg in "${packages[@]}"; do
# Trim spaces
pkg=${pkg// /}
# Skip comments
if [[ ${pkg:0:1} == "#" ]]; then continue; fi
python3 -m pip install --user $pkg
echo ""
done