diff --git a/setup/index.txt b/setup/index.txt new file mode 100755 index 0000000..ef36e12 --- /dev/null +++ b/setup/index.txt @@ -0,0 +1,100 @@ +#! /bin/bash +# vim: set tabstop=4 shiftwidth=4 noexpandtab filetype=sh: + +# setup/index.txt - upgrade path from Ivan's a2server tree +# +# Ivan's a2server installed with a single copy-paste of a command line that +# downloaded a script and ran it sight-unseen. People are going to continue +# to run that command (they shouldn't, but they will), and we can support +# them doing it for now. + +a2sBranch="master" +a2sScriptURL="https://raw.githubusercontent.com/RasppleII/a2server/${a2sBranch}" +a2sTarball="https://github.com/RasppleII/a2server/archive/${a2sBranch}.tar.gz" + +origDir="$PWD" + +# Set a2sDevel to the location of the source tree if we're running in one +a2sDevel="$( dirname "${BASH_SOURCE[0]}" )/.." +if [[ -f "$a2sDevel/.a2server_source" ]]; then + pushd $a2sDevel >/dev/null + a2sDevel="$PWD" + popd >/dev/null + + cat <<-EOT + This script exists solely for backward-compatibility with IvanX's a2server + website and aliases installed by older versions. You appear to have an + a2server source directory here: + $a2sDevel + + Please run ./install.sh in that directory. Thanks! + + EOT + exit 1 +fi +a2sDevel= + +# Find the version in the install script +newVersion=$(wget -qO- "${a2sScriptURL}/install.sh" | grep '^a2serverVersion' | cut -d '"' -f 2) + + +# It almost never is, but this script could be run with command line arguments, +# of which -y we can use, so we should check for it. We'll pass them all to +# the install script later +autoAnswerYes= +for arg in $@; do + if [[ $arg == "-y" ]]; then + autoAnswerYes=1 + break + fi +done + + + +cat <