dotfiles

*nix config files
git clone git://git.pyratebeard.net/dotfiles.git
Log | Files | Refs | README

tvshuf (302B)


      1 #!/bin/sh
      2 
      3 [ $# -eq 0 ] && exit 1
      4 
      5 tvdir="/media/tv"
      6 series="${tvdir}/$1"
      7 repeat="$2"
      8 
      9 grep ${tvdir} /proc/mounts >/dev/null || exit 1
     10 [ -d ${series} ] || exit 1
     11 
     12 for num in $(seq 1 ${repeat}) ; do
     13 	mpv $(find ${series} -type f -exec file -N -i -- {} + | sed -n 's!: video/[^:]*$!!p' | shuf -n 1)
     14 done