#!/bin/bash toolName="Tvheadend" step_1_info() { echo "Apt - setup $toolName repository"; } step_1_alias() { ALIAS="install"; } step_1() { local sourceList="/etc/apt/sources.list.d/tvheadend.list" local sourceEntry="deb https://apt.tvheadend.org/stable raspbian-stretch main" exe apt update saveReturn $? exe apt install coreutils wget apt-transport-https ca-certificates saveReturn $? endReturn echo -n "Downloading tvheadend repository key ... " exe wget -qO- https://doozer.io/keys/tvheadend/tvheadend/pgp | sudo apt-key add - saveReturn $? endReturn addConf -c "$sourceEntry" "$sourceList" } step_2_info() { echo "Install/Upate $toolName"; } step_2() { exe apt update saveReturn $? exe apt install tvheadend saveReturn $? endReturn echo "More information on $toolName:" echo "https://tvheadend.org/projects/tvheadend/wiki" } step_99_info() { echo "Apt - setup \"old\" Bintray repository"; } step_99() { local sourceList="/etc/apt/sources.list.d/tvheadend.list" local sourceEntry="deb https://dl.bintray.com/mpmc/deb raspbianstretch release-4.2" exe apt update && apt install dirmngr exe apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv-keys 379CE192D401AB61 if [ -f "$sourceList" ] ; then echo "Skipping creating of $sourceList; Already exists" return fi echo "$sourceEntry" > "$sourceList" exe apt update saveReturn $? endReturn } VERSION_SEQREV=3 . sequencer.sh