#!/bin/sh S="../assets/clips" L=`find $S -name '*.flv' | sed -e "s:$S/::g"`; tx=nil for i in $L; do p=$i; d=`dirof $i`; e=`echo $d | sed -e "s:/:-:g"`; n=`echo $p | sed -e "s:/:-:g" -e "s:\.flv::g"`; display=`echo $p | sed -e "s:\.flv::g"`; E="t mx sh cfg" for x in $E; do t=template-player-$x-flv.cfg if [ "$x" = "mx" ]; then if [ -f $e.mx ]; then t=$e.mx; fi if [ -f $n.mx ]; then t=$n.mx; fi tx=$t; echo creating video-clips-$n with $t fi; cat $t | \ sed -e "s:@url:$S/$p:g" \ -e "s:@text:$d:g" \ -e "s:@template:$tx:g" \ -e "s:@name:$n:g" \ -e "s:@display:$display:g" \ -e "s:@extension:$e:g" \ -e "s:@place:$p:g" \ -e "s:@source:$S:g" \ -e "s:@file:video-clips-$n:g" \ > video-clips-$n.$x; done; chmod a+x video-clips-$n.sh done; touch list-video.t