mirror of
https://github.com/mailcow/mailcow-dockerized.git
synced 2024-12-15 09:00:26 +08:00
Test new update check
This commit is contained in:
parent
3d652dd3d0
commit
bedd361059
14
update.sh
14
update.sh
@ -20,6 +20,20 @@ set -o pipefail
|
||||
export LC_ALL=C
|
||||
DATE=$(date +%Y-%m-%d_%H_%M_%S)
|
||||
BRANCH=$(git rev-parse --abbrev-ref HEAD)
|
||||
|
||||
case "${1}" in
|
||||
--check|-c)
|
||||
echo "Checking remote code for updates..."
|
||||
git fetch
|
||||
if ! git diff --quiet --exit-code; then
|
||||
echo "Updated code is available."
|
||||
else
|
||||
echo "No updates available."
|
||||
fi
|
||||
exit 0
|
||||
;;
|
||||
esac
|
||||
|
||||
TMPFILE=$(mktemp "${TMPDIR:-/tmp}/curldata.XXXXXX")
|
||||
|
||||
echo -e "\e[32mChecking for newer update script...\e[0m"
|
||||
|
Loading…
Reference in New Issue
Block a user