diff options
Diffstat (limited to 'usr/lib/vdr/inc/commands-functions.sh')
-rw-r--r-- | usr/lib/vdr/inc/commands-functions.sh | 14 |
1 files changed, 12 insertions, 2 deletions
diff --git a/usr/lib/vdr/inc/commands-functions.sh b/usr/lib/vdr/inc/commands-functions.sh index fc1dcfe..c266121 100644 --- a/usr/lib/vdr/inc/commands-functions.sh +++ b/usr/lib/vdr/inc/commands-functions.sh @@ -1,4 +1,8 @@ +source /usr/lib/vdr/inc/language-functions.sh + merge_commands_conf() { + [[ -z ${VDR_LANGUAGE} ]] && read_vdr_language + local CONFIG="${CONFIG:-/etc/vdr}" local sdir="${1}" local destfile="${2}" @@ -23,10 +27,16 @@ merge_commands_conf() { EOT test -d "${sdir}" || return 1 SFILES=$(echo ${sdir}/*.conf) + local f + local inputf for f in ${SFILES}; do [[ -f "${f}" ]] || continue - echo "# source : ${f}" >> "${mergedfile}" - cat "${f}" >> "${mergedfile}" + inputf="${f}" + + [[ -f "${f}.${VDR_LANGUAGE}" ]] && inputf="${f}.${VDR_LANGUAGE}" + + echo "# source : ${inputf}" >> "${mergedfile}" + cat "${inputf}" >> "${mergedfile}" echo >> "${mergedfile}" done |