Fetch origin before update check
parent
426b597d02
commit
00395b99c6
|
@ -24,7 +24,7 @@ BRANCH=$(git rev-parse --abbrev-ref HEAD)
|
|||
case "${1}" in
|
||||
--check|-c)
|
||||
echo "Checking remote code for updates..."
|
||||
git fetch
|
||||
git fetch origin ${BRANCH}
|
||||
if ! git diff origin/${BRANCH} --quiet; then
|
||||
echo "Updated code is available."
|
||||
else
|
||||
|
@ -34,8 +34,6 @@ case "${1}" in
|
|||
;;
|
||||
esac
|
||||
|
||||
TMPFILE=$(mktemp "${TMPDIR:-/tmp}/curldata.XXXXXX")
|
||||
|
||||
echo -e "\e[32mChecking for newer update script...\e[0m"
|
||||
SHA1_1=$(sha1sum update.sh)
|
||||
git fetch origin ${BRANCH}
|
||||
|
@ -46,7 +44,6 @@ if [[ ${SHA1_1} != ${SHA1_2} ]]; then
|
|||
chmod +x update.sh
|
||||
exit 0
|
||||
fi
|
||||
rm -f mv ${TMPFILE}
|
||||
|
||||
if [[ -f mailcow.conf ]]; then
|
||||
source mailcow.conf
|
||||
|
|
Loading…
Reference in New Issue