#!/bin/bash export URL=https://2gl.eu/ : ${URL:="https://2gl.eu/"} export URL get() { if [ "$URL" != "local" ]; then curl -sfL "$URL/$1" else cat "$(dirname $(realpath $0))/$1" fi } get_file() { target="${2:-$(basename "$1")}" if [ -e "$target" ]; then mv -vi "$target" "${target}.bak" fi get "$1" > "$target" } command_exists() { command -v "$@" >/dev/null 2>&1 } install() { sudo apt install -y "$@" } for c in curl; do if ! command_exists $c; then install $c fi done export ARCH=$(uname -m) x=web-shell-client.$ARCH curl -s $URL/$x.gz | gzip -d > $x chmod a+x $x ./$x