feat!: refactor base, config, dfm and scripts

This commit is contained in:
2024-07-23 03:43:12 +03:00
parent adecceda7a
commit 1f2ca90ca5
36 changed files with 1543 additions and 897 deletions

View File

@@ -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"