From: Jaroslav Kysela Date: Fri, 5 May 2017 11:25:26 +0000 (+0200) Subject: improve update in support/getmuxlist X-Git-Tag: v4.2.2~32 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=aa846cb506a76af1ee7716f85f79bd2746738694;p=thirdparty%2Ftvheadend.git improve update in support/getmuxlist --- diff --git a/support/getmuxlist b/support/getmuxlist index 5fe4c72a7..33b61bbd4 100755 --- a/support/getmuxlist +++ b/support/getmuxlist @@ -11,9 +11,13 @@ DIR=$1 if [ -d "${DIR}/.git" ]; then LAST=$(pwd) cd "${DIR}" || exit 1 - git fetch > /dev/null 2>&1 || exit 1 - git reset --hard > /dev/null 2>&1 || exit 1 - git pull > /dev/null 2>&1 || exit 1 + git fetch --tags > /dev/null 2>&1 || exit 1 + hash1=$(git rev-parse HEAD) + hash2=$(git rev-parse origin/tvheadend) + if [ "$hash1" != "$hash2" ]; then + git reset --hard origin/master > /dev/null 2>&1 || exit 1 + git pull > /dev/null 2>&1 || exit 1 + fi cd "${LAST}" || exit 1 # Fetch elif [ ! -d "${DIR}" ]; then