From 1c1e5f187d9894716f8c2039212b410f7ee61b4e Mon Sep 17 00:00:00 2001 From: Steven Burnham Date: Fri, 17 Nov 2023 21:35:48 -0500 Subject: [PATCH] added first working version --- unix_installer.sh | 21 ++++++++++++++++----- 1 file changed, 16 insertions(+), 5 deletions(-) diff --git a/unix_installer.sh b/unix_installer.sh index e1b6b63..50bccd8 100644 --- a/unix_installer.sh +++ b/unix_installer.sh @@ -16,14 +16,22 @@ if [[ "$OS_NAME" == "Darwin" ]]; then brew install cmake brew install pkgconfig elif [[ "$OS_NAME" == "Linux" ]]; then - echo "The operating system is Linux." + echo "The operating system is Linux." + echo "Installing dependencies: cmake and pkgconfig" + sudo wget -O /usr/local/bin/pacapt https://github.com/icy/pacapt/raw/ng/pacapt + sudo chmod 755 /usr/local/bin/pacapt + sudo ln -sv /usr/local/bin/pacapt /usr/local/bin/pacman || true + sudo /usr/local/bin/pacapt -S cmake pkg-config git + echo "Removing temporary files" + sudo rm /usr/local/bin/pacapt + sudo rm /usr/local/bin/pacman else echo "Unknown operating system: $OS_NAME" fi # Create a virtual environment mkdir -p ~/.venv -python3.10 -m venv ~/.venv/pypush +python3 -m venv ~/.venv/pypush source ~/.venv/pypush/bin/activate # Clone the repo @@ -31,11 +39,14 @@ cd ~ git clone -b sms-registration https://github.com/beeper/pypush cd pypush +# Install dependencies +pip install -r requirements.txt + # Prompt the user for the IP address of their phone. -read -p "Enter the IP address of your phone: " PHONEIP +read -p "Enter the IP address of your phone(displayed in the Android helper app): " PHONEIP # Execute the `python demo.py` script with the phone IP address passed as a parameter. -python demo.py --phone $PHONEIP +python3 demo.py --phone $PHONEIP # Create a reregistration script cat > reregister.sh <