From e33d94ecc63ded70042bb24c852e2fdb36165806 Mon Sep 17 00:00:00 2001 From: Eduardo Soares Date: Fri, 1 Nov 2019 01:42:43 +0000 Subject: [PATCH] Add support for custom player from env var --- radio.sh | 6 +++++- tv.sh | 6 +++++- 2 files changed, 10 insertions(+), 2 deletions(-) diff --git a/radio.sh b/radio.sh index ae0052e..71a2258 100755 --- a/radio.sh +++ b/radio.sh @@ -1,6 +1,10 @@ #!/bin/bash -PLAYER="mpv" +if [[ -z "${PLAYER}" ]]; then + PLAYER="mpv" +else + MY_SCRIPT_VARIABLE="${PLAYER}" +fi TITLES=( "Antena1" diff --git a/tv.sh b/tv.sh index cf9fc58..21dcd2c 100755 --- a/tv.sh +++ b/tv.sh @@ -1,6 +1,10 @@ #!/bin/bash -PLAYER="mpv" +if [[ -z "${PLAYER}" ]]; then + PLAYER="mpv" +else + MY_SCRIPT_VARIABLE="${PLAYER}" +fi TITLES=( "RTP 1"