diff --git a/README.md b/README.md index 6690106..ff19798 100644 --- a/README.md +++ b/README.md @@ -46,7 +46,7 @@ Once you have those: export A2SERVER_NO_EXTERNAL=1 ~~~ -You may want to put the above exports into ~/.bashrc or ~/.bash_profile. +You may want to put the above exports into `~/.bashrc` or `~/.bash_profile`. If you want to host scripts locally installed on your own machine or another computer on your LAN, type the following, and export "http://localhost:8000/" diff --git a/scripts/a2server-2-tools.txt b/scripts/a2server-2-tools.txt index b0c6316..ef3981b 100755 --- a/scripts/a2server-2-tools.txt +++ b/scripts/a2server-2-tools.txt @@ -22,7 +22,7 @@ arch= if [[ -f /usr/bin/raspi-config ]]; then isRpi=1 arch='rpi' -elif lsb_release -a 2> /dev/null | grep -q 'Distributor ID:.Debian' && [[ $(cut -c 1 <<< $debianVersion) -ge "7" ]]; then +elif lsb_release -a 2> /dev/null | grep -q 'Distributor ID:.Debian' && [[ $(cut -d . -f 1 <<< $debianVersion) -ge "7" ]]; then uname_m="$(uname -m)" if [[ $uname_m == "i686" ]]; then arch='debian_x86' @@ -33,10 +33,10 @@ fi debianName= if [[ $debianVersion ]]; then - debianMajor=$(cut -c 1-2 <<< $debianVersion) - if [[ $debianMajor == "8." ]]; then + debianMajor=$(cut -d . -f 1 <<< $debianVersion) + if [[ $debianMajor == "8" ]]; then debianName="jessie" - elif [[ $debianMajor == "7." ]]; then + elif [[ $debianMajor == "7" ]]; then debianName="wheezy" else debianName="unknown" diff --git a/scripts/a2server-3-sharing.txt b/scripts/a2server-3-sharing.txt index d6645cc..f992cb9 100755 --- a/scripts/a2server-3-sharing.txt +++ b/scripts/a2server-3-sharing.txt @@ -32,7 +32,7 @@ arch= if [[ -f /usr/bin/raspi-config ]]; then isRpi=1 arch='rpi' -elif lsb_release -a 2> /dev/null | grep -q 'Distributor ID:.Debian' && [[ $(cut -c 1 <<< $debianVersion) -ge "7" ]]; then +elif lsb_release -a 2> /dev/null | grep -q 'Distributor ID:.Debian' && [[ $(cut -d . -f 1 <<< $debianVersion) -ge "7" ]]; then uname_m="$(uname -m)" if [[ $uname_m == "i686" ]]; then arch='debian_x86' @@ -43,10 +43,10 @@ fi debianName= if [[ $debianVersion ]]; then - debianMajor=$(cut -c 1-2 <<< $debianVersion) - if [[ $debianMajor == "8." ]]; then + debianMajor=$(cut -d . -f 1 <<< $debianVersion) + if [[ $debianMajor == "8" ]]; then debianName="jessie" - elif [[ $debianMajor == "7." ]]; then + elif [[ $debianMajor == "7" ]]; then debianName="wheezy" else debianName="unknown" diff --git a/scripts/a2server-5-netboot.txt b/scripts/a2server-5-netboot.txt index a9b6699..61c156b 100755 --- a/scripts/a2server-5-netboot.txt +++ b/scripts/a2server-5-netboot.txt @@ -340,11 +340,22 @@ if [[ ! $autoAnswerYes || -f /tmp/a2server-setupNetBoot ]]; then if [[ $gsosReinstall ]]; then if [[ ! $autoAnswerYes ]]; then + echo echo "You can set up GS/OS for network boot. This may take a while." - echo "0: don't install GS/OS" - echo "1: GS/OS 6.0.1 (official Apple release, May 1993)" - echo "2: GS/OS 6.0.2 (community release by Antoine Vignau, July 2015)" - echo "3: GS/OS 6.0.3 (community release by Tony Diaz, August 2015)" + echo + echo " 0: don't install GS/OS" + echo " 1: GS/OS 6.0.1 (May 1993) [official release]" + echo " The final version authorized by Apple. It has a few bugs," + echo " but most of these can be patched. Predictable and might be" + echo " required if you use certain patches." + echo " 2: GS/OS 6.0.2 (Jul 2015)" + echo " A community effort released by Antoine Vignau with fixes for" + echo " some serious bugs and a few other enhancements." + echo " 3: GS/OS 6.0.3 (Aug 2015)" + echo " Continuing community effort released by Tony Diaz. Includes" + echo " previous work along with additional fixes/changes. Better" + echo " documentation of changes. Most will prefer this or Apple's" + echo " release above." echo echo -n "Which flavor would you like? " read diff --git a/scripts/a2server-7-console.txt b/scripts/a2server-7-console.txt index f7242a1..25e72b2 100755 --- a/scripts/a2server-7-console.txt +++ b/scripts/a2server-7-console.txt @@ -14,7 +14,7 @@ password="your password" [[ $isRaspberryPw ]] && password="'raspberry'" isDebian= -[[ ( -f /etc/debian_version ) && ( $(cut -c 1-2 < /etc/debian_version) == "7." ) && ( $(uname -m) == "i686" ) ]] && isDebian=1 +b_release -a 2> /dev/null | grep -q 'Distributor ID:.Debian' && [[ ( -f /etc/debian_version ) && ( $(cut -d . -f 1 < /etc/debian_version) -ge "7" ) ]] && isDebian=1 if [[ $isDebian ]]; then if { lspci 2> /dev/null | grep -q VirtualBox; }; then diff --git a/setup/index.txt b/setup/index.txt index daf83c4..b932686 100755 --- a/setup/index.txt +++ b/setup/index.txt @@ -27,12 +27,13 @@ isRpi= [[ -f /usr/bin/raspi-config ]] && isRpi=1 isDebian= -lsb_release -a 2> /dev/null | grep -q 'Distributor ID:.Debian' && [[ ( -f /etc/debian_version ) && ( $(cut -c 1 < /etc/debian_version) -ge "7" ) ]] && isDebian=1 +lsb_release -a 2> /dev/null | grep -q 'Distributor ID:.Debian' && [[ ( -f /etc/debian_version ) && ( $(cut -d . -f 1 < /etc/debian_version) -ge "7" ) ]] && 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)" +if [ -f /usr/local/etc/A2SERVER-version ]; then + installedVersion="$(cat /usr/local/etc/A2SERVER-version)" fi +echo "A2SERVER version available: $a2serverVersion" +echo "A2SERVER version installed: ${installedVersion:=None}" echo [[ $scriptURL != *"ivanx.com"* && $scriptURL != *"rawgit.com/RasppleII/a2server"* ]] && echo "Using script URL: $scriptURL" @@ -77,10 +78,7 @@ while [[ $1 ]]; do updateRasppleII=1 elif [[ $1 == "-v" ]]; then shift - if [[ ! -f /usr/local/etc/A2SERVER-version ]]; then - echo "A2SERVER version available: $a2serverVersion" - echo "A2SERVER version installed: none" - fi + # Version was already printed [[ $0 == "-bash" ]] && return 1 || exit 1 elif [[ $1 ]]; then echo "options:"