Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 0 additions & 2 deletions docs/senpcli-guide.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,6 @@ pip install senpwai

- **Android (Using [termux](https://github.com/termux/termux-app), note that the android port is currently really buggy and barely even works)**

***CURRENTLY BROKEN !!!***

```sh
pkg update -y && curl https://raw.githubusercontent.com/SenZmaKi/Senpwai/master/termux/install.sh | bash
```
Expand Down
27 changes: 14 additions & 13 deletions termux/install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -5,37 +5,38 @@ set -e
echo -e "\033[0;32mUpdating pkg\033[0m"
pkg update -y

echo -e "\033[0;32mInstalling python 3.11\033[0m"
pkg install python=3.11.* -y
echo -e "\033[0;32mInstalling python\033[0m"
pkg install python -y

echo -e "\033[0;32mInstalling git\033[0m"
pkg install git -y

SENPWAI_DIR=$PREFIX/share/Senpwai
SENPWAI_DIR="$PREFIX/share/Senpwai"
echo -e "\033[0;32mCloning repository to $SENPWAI_DIR\033[0m"
rm -rf $SENPWAI_DIR
git clone https://github.com/SenZmaKi/Senpwai --depth 1 $SENPWAI_DIR
cd $SENPWAI_DIR
rm -rf "$SENPWAI_DIR"
git clone https://github.com/SenZmaKi/Senpwai --depth 1 "$SENPWAI_DIR"
cd "$SENPWAI_DIR"

echo -e "\033[0;32mCreating virtual environment, this may take a while\033[0m"
python3 -m venv .venv
python -m venv .venv

echo -e "\033[0;32mActivating virtual environment\033[0m"
source .venv/bin/activate

echo -e "\033[0;32mInstalling python-cryptography\033[0m"
PYTHON_VERSION=$(python -V | cut -d' ' -f2 | cut -d'.' --complement -f3)
apt download python-cryptography
dpkg -x python-cryptography_* $PREFIX/tmp
mv $PREFIX/tmp${PREFIX}/lib/python3.11/site-packages/* .venv/lib/python3.11/site-packages
dpkg -x python-cryptography_*.deb "$PREFIX/tmp"
mv "$PREFIX"/tmp"${PREFIX}"/lib/python"${PYTHON_VERSION}"/site-packages/* .venv/lib/python"${PYTHON_VERSION}"/site-packages

echo -e "\033[0;32mInstalling dependencies\033[0m"
pip install -r termux/requirements.txt

SENPCLI_SH_PATH=$SENPWAI_DIR/termux/senpcli.sh
SENPCLI_BIN_PATH=$PREFIX/bin/senpcli
SENPCLI_SH_PATH="$SENPWAI_DIR/termux/senpcli.sh"
SENPCLI_BIN_PATH="$PREFIX/bin/senpcli"
echo -e "\033[0;32mSetting up senpcli\033[0m"
chmod +x $SENPCLI_SH_PATH
mv $SENPCLI_SH_PATH $SENPCLI_BIN_PATH
chmod +x "$SENPCLI_SH_PATH"
mv "$SENPCLI_SH_PATH" "$SENPCLI_BIN_PATH"

echo ""
echo -e "\033[0;32mInstallation complete\033[0m"
Expand Down