From a0cacc48888156863d3a48115ac1e4d82747c497 Mon Sep 17 00:00:00 2001 From: "T. Joseph Carter" Date: Mon, 12 Oct 2015 12:30:17 -0700 Subject: [PATCH] Revert "Always output version, and only do it once" This reverts commit 8caea62d2dd595a7a485ae7d89d5f8d87a4259d3. --- setup/index.txt | 24 ++++++++++-------------- 1 file changed, 10 insertions(+), 14 deletions(-) diff --git a/setup/index.txt b/setup/index.txt index 506c6b3..74f36e3 100755 --- a/setup/index.txt +++ b/setup/index.txt @@ -60,12 +60,16 @@ isRpi= isDebian= [[ ( -f /etc/debian_version ) && ( $(cut -c 1-2 < /etc/debian_version) == "7." ) && ( $(uname -m) == "i686" ) ]] && isDebian=1 +if [[ -f /usr/local/etc/A2SERVER-version ]]; then + echo "A2SERVER version available: $a2serverVersion" + echo "A2SERVER version installed: $(cat /usr/local/etc/A2SERVER-version)" +fi + skipRepoUpdate= autoAnswerDefault= setupNetBoot= setupWindowsSharing= updateRasppleII= -justShowVersion= while [[ $1 ]]; do if [[ $1 == "-r" ]]; then shift @@ -88,8 +92,12 @@ while [[ $1 ]]; do shift updateRasppleII=1 elif [[ $1 == "-v" ]]; then - justShowVersion=1 shift + if [[ ! -f /usr/local/etc/A2SERVER-version ]]; then + echo "A2SERVER version available: $a2serverVersion" + echo "A2SERVER version installed: none" + fi + [[ $0 == "-bash" ]] && return 1 || exit 1 elif [[ $1 ]]; then echo "options:" echo "-v: display installed and available versions, then exit" @@ -104,18 +112,6 @@ while [[ $1 ]]; do fi done - -echo "A2SERVER version available: $a2serverVersion" -if [[ -f /usr/local/etc/A2SERVER-version ]]; then - echo "A2SERVER version installed: $(cat /usr/local/etc/A2SERVER-version)" -else - echo "A2SERVER version installed: none" -fi -if [[ $justShowVersion ]]; then - # User passed -v to the script, so we stop here - [[ $0 == "-bash" ]] && return 1 || exit 1 -fi - if [[ $updateRasppleII ]]; then echo "A2SERVER: Updating Raspple II (takes up to an hour)..." wget -qO /tmp/raspbian-update "http://appleii.ivanx.com/a2server/files/raspbian-update.txt"