Hallo,
ich wollte bei meinem VDR mal die Channellogos auf den aktuellen Stand bringen. Da mir das manuelle nachprüfen der Channelnamen und Dateinamen zu mühsam war habe ich mir ein kleines feines bash script geschrieben. Es ist wirklich einfach und selbst erklärend. Ich möchte es euch nicht vorenthalten, evtl. findet jemand ja genauso Verwendung wie ich
Bash
#!/bin/bash
# config section
CHANNELS=/etc/vdr/channels.conf
IMAGES=/etc/vdr/plugins/text2skin/liquid-logos4anthra_HD/ # last slash is important
IMAGE_EXTENSION=".png"
# end config section
COUNTNOIMAGE=0
# read any line from channels.conf
while read line
do
# check if it start with ':' so it is a group
if [ "${line:0:1}" = ":" ]
then
continue
fi
# get the channel name
CHAN=${line%%;*}
# test if there is an image with CHAN name
if [ ! -e "${IMAGES}${CHAN}${IMAGE_EXTENSION}" ]
then
echo "there is no imiage for channel: $CHAN"
let COUNTNOIMAGE=$COUNTNOIMAGE+1
fi
done < $CHANNELS
echo ""
echo "$COUNTNOIMAGE missing images"
Alles anzeigen
Grüße Martin