From: Jaroslav Kysela Date: Sat, 6 May 2017 15:26:23 +0000 (+0200) Subject: fix support/getmuxlist for doozer X-Git-Tag: v4.2.2~31 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=21c97e10cc789b2794dc74fd113732b2309e9727;p=thirdparty%2Ftvheadend.git fix support/getmuxlist for doozer --- diff --git a/support/getmuxlist b/support/getmuxlist index 33b61bbd4..33b1bdc08 100755 --- a/support/getmuxlist +++ b/support/getmuxlist @@ -4,8 +4,9 @@ # # Arguments -DIR=$1 -[ -z "$DIR" ] && DIR=$(dirname "$0")/../data/dvb-scan +[ -z "$BRANCH" ] && BRANCH=tvheadend +[ -z "$URL" ] && URL=https://github.com/tvheadend/dtv-scan-tables.git +DIR="$1" && [ -z "$DIR" ] && DIR=$(dirname "$0")/../data/dvb-scan # Update if [ -d "${DIR}/.git" ]; then @@ -13,17 +14,23 @@ if [ -d "${DIR}/.git" ]; then cd "${DIR}" || exit 1 git fetch --tags > /dev/null 2>&1 || exit 1 hash1=$(git rev-parse HEAD) - hash2=$(git rev-parse origin/tvheadend) + hash2=$(git rev-parse origin/${BRANCH}) if [ "$hash1" != "$hash2" ]; then git reset --hard origin/master > /dev/null 2>&1 || exit 1 git pull > /dev/null 2>&1 || exit 1 + else + if [ ! -r README ]; then + git reset --hard > /dev/null 2>&1 || exit 1 + fi fi + pwd + ls -la * + ls -la .git/ + cat .git/config cd "${LAST}" || exit 1 # Fetch elif [ ! -d "${DIR}" ]; then - URL=https://github.com/tvheadend/dtv-scan-tables.git - BRANCH=tvheadend - git clone -b $BRANCH $URL "${DIR}" > /dev/null 2>&1 || exit 1 + git clone -b "${BRANCH}" "${URL}" "${DIR}" > /dev/null 2>&1 || exit 1 fi # Note: will not update existing set (if not .git)