mirror of
https://github.com/ivuorinen/dotfiles.git
synced 2026-02-14 19:53:22 +00:00
feat(dfm): install pip/python packages
This commit is contained in:
@@ -41,6 +41,7 @@ function section_install
|
|||||||
"nvm:Install Node Version Manager (nvm)"
|
"nvm:Install Node Version Manager (nvm)"
|
||||||
"npm:Install NPM Packages"
|
"npm:Install NPM Packages"
|
||||||
"ntfy:Install ntfy"
|
"ntfy:Install ntfy"
|
||||||
|
"pip:Install pip/python packages"
|
||||||
"z:Install z"
|
"z:Install z"
|
||||||
)
|
)
|
||||||
|
|
||||||
@@ -49,6 +50,7 @@ function section_install
|
|||||||
$0 install macos
|
$0 install macos
|
||||||
$0 install antigen
|
$0 install antigen
|
||||||
$0 brew install
|
$0 brew install
|
||||||
|
$0 install pip
|
||||||
$0 install cargo
|
$0 install cargo
|
||||||
$0 install composer
|
$0 install composer
|
||||||
$0 install dotenv
|
$0 install dotenv
|
||||||
@@ -132,6 +134,10 @@ function section_install
|
|||||||
bash "$DOTFILES/scripts/install-ntfy.sh" \
|
bash "$DOTFILES/scripts/install-ntfy.sh" \
|
||||||
&& msg_yay "ntfy installed!"
|
&& msg_yay "ntfy installed!"
|
||||||
;;
|
;;
|
||||||
|
pip)
|
||||||
|
bash "$DOTFILES/scripts/install-pip-packages.sh" \
|
||||||
|
&& msg_yay "pip/python packages installed!"
|
||||||
|
;;
|
||||||
z)
|
z)
|
||||||
bash "$DOTFILES/scripts/install-z.sh" \
|
bash "$DOTFILES/scripts/install-z.sh" \
|
||||||
&& msg_yay "z has been installed!"
|
&& msg_yay "z has been installed!"
|
||||||
|
|||||||
24
scripts/install-pip-packages.sh
Executable file
24
scripts/install-pip-packages.sh
Executable 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
|
||||||
Reference in New Issue
Block a user