#! /bin/bash # vim: set tabstop=4 shiftwidth=4 noexpandtab filetype=sh: a2sScriptURL="https://raw.githubusercontent.com/RasppleII/a2server/master" a2sDevel="$( dirname "${BASH_SOURCE[0]}" )/.." if [[ -f "$a2sDevel/.a2server_source" ]]; then pushd $a2sDevel >/dev/null a2sDevel="$PWD" popd >/dev/null else a2sDevel= fi if [[ -z "$a2sDevel" ]]; then currentVersion=$(wget -qO- "${a2sScriptURL}/setup/index.txt" | grep '^a2serverVersion' | cut -d '"' -f 2) else currentVersion=$(grep '^a2serverVersion' "$a2sDevel/setup/index.txt" | cut -d '"' -f 2) fi if [[ -f /usr/local/etc/A2SERVER-version ]]; then read installedVersion /dev/null unset installedVersion 2> /dev/null