21 lines
380 B
Bash
Executable file
21 lines
380 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
|
|
(cd "${DIR}"; git pull) &> /dev/null
|
|
|
|
# Fetch
|
|
elif [ ! -d "${DIR}" ]; then
|
|
URL=http://linuxtv.org/git/dtv-scan-tables.git
|
|
git clone $URL "${DIR}" &> /dev/null
|
|
fi
|
|
|
|
# Note: will not update existing set (if not .git)
|
|
exit 0
|