#!/bin/sh
cd /video
DEL_RECS=`find . -follow -type d -name "*.del" -print -prune -o -follow -type d -name "*.rec" -prune 2>/dev/null`
if [ "$DEL_RECS" = "" ] ; then
   echo "Keine geloeschten Aufzeichnungen gefunden"
else
   for i in $DEL_RECS ; do
      echo "Undeleting ${i} ..."
      newname=`echo "${i}" | sed "s/.del/.rec/"`
      mv ${i} $newname
   done
fi
