#! /bin/bash # vim: set tabstop=4 shiftwidth=4 noexpandtab filetype=sh: a2server_devel="$( dirname "${BASH_SOURCE[0]}" )/.." if [[ -f "$a2server_devel/.a2server_source" ]]; then pushd $a2server_devel >/dev/null a2server_devel="$PWD" popd >/dev/null else a2server_devel= fi # Ensure URL we'll use ends in a / case "$A2SERVER_SCRIPT_URL" in */) scriptURL="$A2SERVER_SCRIPT_URL" ;; *) scriptURL="${A2SERVER_SCRIPT_URL:-https://raw.githubusercontent.com/RasppleII/a2server/current}/" ;; esac currentVersion=$(wget -qO- "${scriptURL}setup/index.txt" | grep '^a2serverVersion' | cut -d '"' -f 2) if [[ -f /usr/local/etc/A2SERVER-version ]]; then read installedVersion /dev/null wget -q -O /tmp/setup "${scriptURL}setup/index.txt"; source /tmp/setup -i "$@" fi unset currentVersion 2> /dev/null unset installedVersion 2> /dev/null