mirror of
https://github.com/RasppleII/a2server.git
synced 2025-02-03 07:34:04 +00:00
setup/index.txt: Print version once
A minor thing, but reducing slightly duplicated code is always a good thing, and printing the version number is never a bad idea.
This commit is contained in:
parent
750b9998df
commit
cd8271cd56
@ -29,10 +29,11 @@ isRpi=
|
||||
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
|
||||
|
||||
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:"
|
||||
|
Loading…
x
Reference in New Issue
Block a user