tvheadend/support/getmuxlist

24 lines
493 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 pull 2>&1 /dev/null || exit 1
git reset --hard 2>&1 /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}" 2>&1 /dev/null || exit 1
fi
# Note: will not update existing set (if not .git)
exit 0