From e9c53fae6611728b0598f8ed9021949a0aa01876 Mon Sep 17 00:00:00 2001 From: "T. Joseph Carter" Date: Wed, 11 Apr 2018 04:32:01 -0700 Subject: [PATCH] Make index.txt use a2sSource convention Redefining a2sSource to be the top source directory throughout, and I just wrote this index.txt that doesn't follow that convention. Fixed that and removed some unnecessary directory switching in the shell script since the closest we need to get to being in a particular directory is when we extract the tarball, and tar takes arguments for that. Also made the temp dir we create actually be a2sSource for simplicity. --- setup/index.txt | 39 ++++++++++++++++----------------------- 1 file changed, 16 insertions(+), 23 deletions(-) diff --git a/setup/index.txt b/setup/index.txt index ef36e12..cd61c2d 100755 --- a/setup/index.txt +++ b/setup/index.txt @@ -12,32 +12,28 @@ 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" +# Set a2sSource to the location of the source tree if we're running in one +a2sSource="$( dirname "${BASH_SOURCE[0]}" )/.." +if [[ -f "$a2sSource/.a2server_source" ]]; then + pushd $a2sSource >/dev/null + a2sSource="$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 + $a2sSource 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 @@ -49,8 +45,6 @@ for arg in $@; do fi done - - cat <