mirror of
https://github.com/ivuorinen/dotfiles.git
synced 2026-02-16 12:53:58 +00:00
feat!: refactor base, config, dfm and scripts
This commit is contained in:
@@ -2,13 +2,17 @@
|
||||
# Install python/pip packages.
|
||||
#
|
||||
# shellcheck source=shared.sh
|
||||
eval "$HOME/.dotfiles/scripts/shared.sh"
|
||||
source "${DOTFILES}/config/shared.sh"
|
||||
|
||||
# Enable verbosity with VERBOSE=1
|
||||
VERBOSE="${VERBOSE:-0}"
|
||||
|
||||
msg "Starting to install pip packages"
|
||||
|
||||
x-have "python3" || {
|
||||
msg_err "Could not find python3, something really weird is going on." && exit 1
|
||||
}
|
||||
if ! command -v python3 &> /dev/null; then
|
||||
msg_err "Could not find python3, something really weird is going on."
|
||||
exit 1
|
||||
fi
|
||||
|
||||
msg_nested "Upgrading pip"
|
||||
python3 -m pip install --user --upgrade pip
|
||||
@@ -18,16 +22,20 @@ packages=(
|
||||
"libtmux"
|
||||
)
|
||||
|
||||
for pkg in "${packages[@]}"; do
|
||||
# Trim spaces
|
||||
pkg=${pkg// /}
|
||||
# Skip comments
|
||||
if [[ ${pkg:0:1} == "#" ]]; then continue; fi
|
||||
# Function to install pip packages
|
||||
install_packages()
|
||||
{
|
||||
for pkg in "${packages[@]}"; do
|
||||
# Trim spaces
|
||||
pkg=${pkg// /}
|
||||
# Skip comments
|
||||
if [[ ${pkg:0:1} == "#" ]]; then continue; fi
|
||||
|
||||
msg_nested "Installing pip package: $pkg"
|
||||
python3 -m pip install --user --upgrade "$pkg"
|
||||
|
||||
echo ""
|
||||
done
|
||||
msg_nested "Installing pip package: $pkg"
|
||||
python3 -m pip install --user --upgrade "$pkg"
|
||||
echo ""
|
||||
done
|
||||
}
|
||||
|
||||
install_packages
|
||||
msg_yay "Run pip package installations"
|
||||
|
||||
Reference in New Issue
Block a user