]> git.ipfire.org Git - thirdparty/tvheadend.git/commitdiff
fix support/getmuxlist for doozer
authorJaroslav Kysela <perex@perex.cz>
Sat, 6 May 2017 15:26:23 +0000 (17:26 +0200)
committerJaroslav Kysela <perex@perex.cz>
Sat, 6 May 2017 15:47:01 +0000 (17:47 +0200)
support/getmuxlist

index 33b61bbd4c1d74b470205f5dc17fa3f1ae76e157..33b1bdc0841cd190563508cf403ff2a7a4bfe605 100755 (executable)
@@ -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)