a2server/update/index.txt
Ivan X 14f5ef66be alternate URL for precompiled binaries with A2SERVER_BINARY_URL
self-hosted external dependency fallback; or default via A2SERVER_NO_EXTERNAL=1
a2serverrc sets default A2SERVER_SCRIPT_URL and A2SERVER_BINARY_URL
64-bit Debian precompiled binary support
support for reorganized files subdirectory
better information re unsupported OS at start of install
info about netboot at end of install
no longer deletes ~/GNUstep
install libdb5.1 and libssl1.0.0 by default instead of older versions
small tweaks and fixes regarding Debian detection, case insensitive fs, etc
updated source code path for The Unarchiver
this is internal version 1.2.8; see "release" notes about external dependencies
2015-12-24 13:02:17 +09:00

47 lines
1.3 KiB
Bash
Executable File

#! /bin/bash
# vim: set tabstop=4 shiftwidth=4 expandtab filetype=sh:
# Ensure URL we'll use ends in a /
case "$A2SERVER_SCRIPT_URL" in
*/) scriptURL="$A2SERVER_SCRIPT_URL" ;;
*) scriptURL="${A2SERVER_SCRIPT_URL:-http://ivanx.com/a2server}/" ;;
esac
currentVersion=$(wget -qO- "${scriptURL}setup/index.txt" | grep '^a2serverVersion' | cut -d '"' -f 2)
if [[ -f /usr/local/etc/A2SERVER-version ]]; then
installedVersion=$(cat /usr/local/etc/A2SERVER-version)
else
installedVersion=100
fi
autoAnswerYes=
for arg in $@; do
if [[ $arg == "-y" ]]; then
autoAnswerYes=1
break
fi
done
echo
echo "Update history:"
wget -qO- "${scriptURL}update/versionhistory.txt"
echo
echo "installed version: ${installedVersion:0:1}.${installedVersion:1:1}.${installedVersion:2:1}"
echo "current version: ${currentVersion:0:1}.${currentVersion:1:1}.${currentVersion:2:1}"
echo
if [[ $autoAnswerYes ]]; then
REPLY="y"
else
echo -n "Do you want to update (or reinstall) A2SERVER? "
read
fi
if [[ ${REPLY:0:1} == "y" || ${REPLY:0:1} == "Y" ]]; then
sudo rm /usr/local/etc/A2SERVER-version &> /dev/null
# sudo rm /usr/local/etc/netatalk/a2boot/* &> /dev/null
wget -q -O /tmp/setup "${scriptURL}setup/index.txt"; source /tmp/setup "$@"
fi
unset currentVersion 2> /dev/null
unset installedVersion 2> /dev/null