chore: add termux pypi repo before installimg requirements and simplify logic in scripts

This commit is contained in:
thedragonsinn
2025-02-07 21:11:23 +05:30
parent d8a56a7f08
commit c6d34ec0ad
3 changed files with 10 additions and 14 deletions

View File

@@ -1,10 +1,11 @@
#!/usr/bin/env bash
if ! echo "${PATH}" | grep -qi "com.termux"; then
echo "Not a termux Env, Skipping..."
exit
fi
grep -qi "com.termux" <<< "$PATH" || { echo "Not a termux Env, Skipping..."; exit; }
mkdir -p "${HOME}/.config/pip" /dev/null 2>&1
echo -e '[global]\nextra-index-url = https://termux-user-repository.github.io/pypi/' > "${HOME}/.config/pip.conf"
./scripts/install_ub_core.sh
grep -Ev "^#|google-generativeai|pillow" req.txt | xargs -n 1 pip install
grep -Ev "^#|openai" req.txt | xargs -n 1 pip install