diff --git a/README.md b/README.md index ccd761431..79bc77df2 100644 --- a/README.md +++ b/README.md @@ -105,6 +105,12 @@ The channel through which you share the link does not have to be secure - it is curl -o- https://raw.githubusercontent.com/simplex-chat/simplex-chat/stable/install.sh | bash ``` +or to install v3.1.0-beta.0 that supports accessing SimpleX servers via SOCKS5 proxy: + +``` +curl -o- https://raw.githubusercontent.com/simplex-chat/simplex-chat/stable/install.sh | sh -s -- v3.1.0-beta.0 +``` + Once the chat client is installed, simply run `simplex-chat` from your terminal. ![simplex-chat](./images/connection.gif) diff --git a/install.sh b/install.sh index 4518967e5..5e3039d39 100755 --- a/install.sh +++ b/install.sh @@ -1,3 +1,5 @@ +#!/bin/sh + set -eu APP_NAME="simplex-chat" @@ -5,13 +7,23 @@ BIN_DIR="$HOME/.local/bin" BIN_PATH="$BIN_DIR/$APP_NAME" PLATFORM="$(uname)" +if [ -n "$1" ]; then + RELEASE="tag/$1" + DOWNLOAD="download/$1" + echo "downloading SimpleX Chat $1 ..." +else + RELEASE=latest + DOWNLOAD="latest/download" + echo "downloading the latest version of SimpleX Chat ..." +fi + if [ $PLATFORM == "Darwin" ]; then PLATFORM="macos-x86-64" elif [ $PLATFORM == "Linux" ]; then PLATFORM="ubuntu-20_04-x86-64" else echo "Scripted installation on your platform is not supported." - echo "See compiled binaries in the latest release: https://github.com/$APP_NAME/$APP_NAME/releases/latest" + echo "See compiled binaries in the ${1:-latest} release: https://github.com/$APP_NAME/$APP_NAME/releases/$RELEASE" exit 1 fi @@ -67,9 +79,9 @@ fi [[ ! -d $BIN_DIR ]] && mkdir -p $BIN_DIR if [ -n "$(command -v curl)" ]; then - curl -L -o $BIN_PATH "https://github.com/$APP_NAME/$APP_NAME/releases/latest/download/$APP_NAME-$PLATFORM" + curl -L -o $BIN_PATH "https://github.com/$APP_NAME/$APP_NAME/releases/$DOWNLOAD/$APP_NAME-$PLATFORM" elif [ -n "$(command -v wget)" ]; then - wget -O $BIN_PATH "https://github.com/$APP_NAME/$APP_NAME/releases/latest/download/$APP_NAME-$PLATFORM" + wget -O $BIN_PATH "https://github.com/$APP_NAME/$APP_NAME/releases/$DOWNLOAD/$APP_NAME-$PLATFORM" else echo "Cannot download $APP_NAME - please install curl or wget" exit 1