Files
provision_sccp/data/ringtones/mkringlist.sh
Diederik de Groot d60e25d120 Fix ringlist
Signed-off-by: Diederik de Groot <dkgroot@talon.nl>
2020-07-15 19:03:22 +02:00

19 lines
680 B
Bash
Executable File

#!/usr/bin/env bash
outfile=Ringlist.xml
echo -e "<CiscoIPPhoneRingList>" >$outfile
for filename in *.pcm *.raw; do
if [ -f $filename ]; then
echo -e "\t<Ring>" >>$outfile
echo -e "\t\t<DisplayName>${filename%.*}</DisplayName>" >>$outfile
echo -e "\t\t<FileName>${filename}</FileName>" >>$outfile
echo -e "\t</Ring>" >>$outfile
fi
done
echo -e "</CiscoIPPhoneRingList>" >>$outfile
[ -f DistinctiveRinglist.xml ] || ln -s Ringlist.xml DistinctiveRinglist.xml
[ -f distinctiveringlist.xml ] || ln -s Ringlist.xml distinctiveringlist.xml
[ -f ringlist.xml ] || ln -s Ringlist.xml ringlist.xml
for x in *.pcm *.xml *.raw; do
[ -f $x ] && ../../etc/certs/signfile $x
done