tvheadend/support/getmuxlist
Gary The Brown 6f7ddb36d3 FIX: when configure tries to update the mux lists through git it would cause a fail if anything had been changed in the Data/dvb-scan folder
changed the inital git pull to a git fetch and added git pull after the git reset to make sure they have the latest files
2014-09-01 15:34:22 +02:00

25 lines
538 B
Bash
Executable file

#!/bin/sh
#
# Fetch DVB scan files
#
# Arguments
DIR=$1
[ -z "$DIR" ] && DIR=$(dirname "$0")/../data/dvb-scan
# Update
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
cd "${LAST}" || exit 1
# Fetch
elif [ ! -d "${DIR}" ]; then
URL=http://linuxtv.org/git/dtv-scan-tables.git
git clone $URL "${DIR}" > /dev/null 2>&1 || exit 1
fi
# Note: will not update existing set (if not .git)
exit 0