mirror of
https://github.com/Sneed-Group/pypush-plus-plus
synced 2025-01-09 17:33:47 +00:00
added first working version
This commit is contained in:
parent
8c5359957c
commit
1c1e5f187d
1 changed files with 16 additions and 5 deletions
|
@ -17,13 +17,21 @@ if [[ "$OS_NAME" == "Darwin" ]]; then
|
||||||
brew install pkgconfig
|
brew install pkgconfig
|
||||||
elif [[ "$OS_NAME" == "Linux" ]]; then
|
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
|
else
|
||||||
echo "Unknown operating system: $OS_NAME"
|
echo "Unknown operating system: $OS_NAME"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# Create a virtual environment
|
# Create a virtual environment
|
||||||
mkdir -p ~/.venv
|
mkdir -p ~/.venv
|
||||||
python3.10 -m venv ~/.venv/pypush
|
python3 -m venv ~/.venv/pypush
|
||||||
source ~/.venv/pypush/bin/activate
|
source ~/.venv/pypush/bin/activate
|
||||||
|
|
||||||
# Clone the repo
|
# Clone the repo
|
||||||
|
@ -31,11 +39,14 @@ cd ~
|
||||||
git clone -b sms-registration https://github.com/beeper/pypush
|
git clone -b sms-registration https://github.com/beeper/pypush
|
||||||
cd pypush
|
cd pypush
|
||||||
|
|
||||||
|
# Install dependencies
|
||||||
|
pip install -r requirements.txt
|
||||||
|
|
||||||
# Prompt the user for the IP address of their phone.
|
# 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.
|
# 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
|
# Create a reregistration script
|
||||||
cat > reregister.sh <<EOF
|
cat > reregister.sh <<EOF
|
||||||
|
@ -44,7 +55,7 @@ cd ~/pypush
|
||||||
source ~/.venv/pypush/bin/activate
|
source ~/.venv/pypush/bin/activate
|
||||||
while true
|
while true
|
||||||
do
|
do
|
||||||
python ./demo.py --daemon
|
python3 ./demo.py --daemon
|
||||||
# If it disconnects, wait 5 minutes before reconnecting to avoid spamming servers
|
# If it disconnects, wait 5 minutes before reconnecting to avoid spamming servers
|
||||||
sleep 300
|
sleep 300
|
||||||
done
|
done
|
||||||
|
|
Loading…
Reference in a new issue