mirror of
https://github.com/RasppleII/a2server.git
synced 2026-04-21 05:16:39 +00:00
Make version semantic (Closes #49)
What's still missing from this is a version comparison mechanism. The reason why it is missing is that we only use this in one place at the moment, and if you have a version string that is not three digits, your version is recent enough. This means we can save this for when there are a common functions script to import and make the comparisons for us without code duplication.
This commit is contained in:
@@ -56,9 +56,10 @@ if [[ $debianVersion ]]; then
|
||||
fi
|
||||
|
||||
# skip this if already done
|
||||
if [[ -f /usr/local/etc/A2SERVER-version && $(head -c 3 /usr/local/etc/A2SERVER-version) -ge 101 ]]; then
|
||||
echo "A2SERVER: Netatalk is already installed."
|
||||
else
|
||||
if [[ -f /usr/local/etc/A2SERVER-version ]]; then
|
||||
read a2sVersion </usr/local/etc/A2SERVER-version
|
||||
fi
|
||||
if [[ $a2sVersion = *.*.* || $a2sVersion -ge 101]]; then
|
||||
echo "A2SERVER: Installing Netatalk (this will take a while)..."
|
||||
# stop Netatalk and samba if running (during upgrade)
|
||||
if [[ $(ps --no-headers -C afpd) ]]; then
|
||||
@@ -176,7 +177,10 @@ else
|
||||
cd
|
||||
rm -rf /tmp/netatalk
|
||||
fi
|
||||
else
|
||||
echo "A2SERVER: Netatalk is already installed."
|
||||
fi
|
||||
unset a2sVersion
|
||||
|
||||
# --- Install MacIPgw
|
||||
if ! hash macipgw &>/dev/null; then
|
||||
|
||||
Reference in New Issue
Block a user