Initial commit: Geminux 0.1.0 (helio) for Planet Computers Gemini PDA (MT6797X)
This commit is contained in:
commit
034c1f61b1
816 files changed
+223435
No files matched your search
Executable
+29
@@ -0,0 +1,29 @@
|
||||
#!/bin/sh
|
||||
# Install host Python dependencies needed by flash-mtk.py into .flash-deps/.
|
||||
set -eu
|
||||
|
||||
BASE_DIR="$(cd "$(dirname "$0")/.." && pwd)"
|
||||
PYTHON_BIN="${PYTHON_BIN:-python3}"
|
||||
TARGET="$BASE_DIR/.flash-deps"
|
||||
|
||||
if "$PYTHON_BIN" -c 'import usb.core, serial, Crypto, colorama' >/dev/null 2>&1; then
|
||||
echo "[flash-deps] pyusb, pyserial, pycryptodome, and colorama are already available."
|
||||
exit 0
|
||||
fi
|
||||
|
||||
if [ -d "$TARGET" ] && PYTHONPATH="$TARGET${PYTHONPATH:+:$PYTHONPATH}" \
|
||||
"$PYTHON_BIN" -c 'import usb.core, serial, Crypto, colorama' >/dev/null 2>&1; then
|
||||
echo "[flash-deps] Using existing dependencies in $TARGET."
|
||||
exit 0
|
||||
fi
|
||||
|
||||
if ! "$PYTHON_BIN" -m pip --version >/dev/null 2>&1; then
|
||||
echo "Error: python3 pip is required to install flashing dependencies (pyusb, pyserial, pycryptodome, colorama)." >&2
|
||||
exit 1
|
||||
fi
|
||||
|
||||
echo "[flash-deps] Installing pyusb, pyserial, pycryptodome, colorama into $TARGET..."
|
||||
mkdir -p "$TARGET"
|
||||
"$PYTHON_BIN" -m pip install --disable-pip-version-check --no-input \
|
||||
--target "$TARGET" pyusb pyserial pycryptodome colorama
|
||||
echo "[flash-deps] Done."
|
||||
Reference in new issue
Block a user