From 80b03b3ff3a25820fd08638dc3625e7e2ac4ee0e Mon Sep 17 00:00:00 2001 From: Jaroslav Kysela Date: Sat, 6 May 2017 17:26:23 +0200 Subject: [PATCH] test --- Makefile | 2 +- support/getmuxlist | 19 +++++++++++++------ 2 files changed, 14 insertions(+), 7 deletions(-) diff --git a/Makefile b/Makefile index 844edc46e..49913e994 100644 --- a/Makefile +++ b/Makefile @@ -782,7 +782,7 @@ endif $(ROOTDIR)/data/dvb-scan/.stamp: @echo "Receiving data/dvb-scan from https://github.com/tvheadend/dtv-scan-tables.git#tvheadend" @rm -rf $(ROOTDIR)/data/dvb-scan/* - @$(ROOTDIR)/support/getmuxlist $(ROOTDIR)/data/dvb-scan + sh -x $(ROOTDIR)/support/getmuxlist $(ROOTDIR)/data/dvb-scan @touch $@ .PHONY: check_dvb_scan 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) -- 2.47.2