2024-09-23 15:20:23 +05:30
|
|
|
#!/bin/bash
|
|
|
|
OS=$(uname -s)
|
|
|
|
|
|
|
|
if [ "$OS" == "Linux" ]; then
|
2025-02-26 20:28:33 +05:30
|
|
|
# Check poetry installation and exit if no installation found.
|
|
|
|
if ! command -v poetry 2>&1 >/dev/null
|
|
|
|
then
|
|
|
|
echo "Could not detect Poetry installation. Please make sure you install Poetry first.
|
|
|
|
See https://python-poetry.org/docs/#installation or run pip3 install poetry"
|
|
|
|
exit 1
|
|
|
|
fi
|
|
|
|
|
2024-09-23 15:20:23 +05:30
|
|
|
# setup environment
|
|
|
|
cd cli
|
|
|
|
poetry install
|
|
|
|
echo "OnionShare CLI is installed!"
|
|
|
|
cd ../desktop
|
|
|
|
poetry install
|
|
|
|
|
|
|
|
# setup tor
|
|
|
|
poetry run python ./scripts/get-tor.py linux-x86_64
|
2025-02-26 20:27:33 +05:30
|
|
|
echo "Tor is installed"
|
2024-09-23 15:20:23 +05:30
|
|
|
|
|
|
|
# compile dependencies
|
|
|
|
./scripts/build-pt-obfs4proxy.sh
|
|
|
|
./scripts/build-pt-snowflake.sh
|
|
|
|
./scripts/build-pt-meek.sh
|
|
|
|
|
|
|
|
# add alias
|
|
|
|
echo "alias onionshare='cd $(pwd) && poetry run onionshare'" >> ~/.bash_aliases
|
|
|
|
source ~/.bash_aliases
|
|
|
|
|
|
|
|
echo "OnionShare Desktop is now installed"
|
|
|
|
echo "Try running 'onionshare' to start onionshare server from source tree"
|
|
|
|
echo "Restart a new terminal if the above doesnt work"
|
|
|
|
echo "Checkout desktop/README.md for more info"
|
|
|
|
else
|
|
|
|
echo "This script only works in linux distros, Try cli/README.md, desktop/README.md for installation steps"
|
|
|
|
exit 1
|
|
|
|
fi
|