tvheadend/support/getmuxlist
Jaroslav Kysela 1418b64112 scanfile: Add satellite.xml database support (enigma2, satellites-xml.eu)
- also improve the linuxdvb scanfile database fetching
2014-05-26 15:11:27 +02:00

24 lines
489 B
Bash
Executable file

#!/bin/bash
#
# 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 pull &> /dev/null || exit 1
git reset --hard &> /dev/null || 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 || exit 1
fi
# Note: will not update existing set (if not .git)
exit 0