topical media & game development

talk show tell print

#video-media.sh / sh



  #!/bin/sh
  S="../assets/clips/media"
  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 [ -f template-player-x-media.cfg ]; then
  t=template-player-x-media.cfg 
  fi;
  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-media-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:@sh-video-media:video-media-n:g"  \
               > video-media-n.x;
  done;
  chmod a+x video-media-n.sh
  done;
  touch list-video.t
  


(C) Æliens 04/09/2009

You may not copy or print any of this material without explicit permission of the author or the publisher. In case of other copyright issues, contact the author.