Files
bin/dvddirdel
2012-12-16 18:46:30 +01:00

42 lines
975 B
Bash
Executable File

#!/bin/sh
if [ -f /usr/local/etc/dvdauthor.conf ]; then
. /usr/local/etc/dvdauthor.conf
fi
if [ -f ~/.dvdauthorrc ]; then
. ~/.dvdauthorrc
fi
help=0
out=0
for i in "$@"; do
if [ $out = 1 ]; then
WORKDIR="$i"
out=0
elif [ "x$i" = "x-h" ]; then
help=1
elif [ "x$i" = "x-o" ]; then
out=1
fi
done
if [ $help = 1 -o "x$WORKDIR" = "x" ]; then
echo "DVDAuthor, version 0.6.18. Send bugs to <dvdauthor-users@lists.sourceforge.net>"
echo "syntax: dvddirdel [-o DIR]"
echo " deletes a previously authored DVD directory structure in DIR"
exit 1
fi
if [ -d "$WORKDIR" ]; then
rm -f "$WORKDIR/VIDEO_TS"/VIDEO_TS.VOB
rm -f "$WORKDIR/VIDEO_TS"/VIDEO_TS.IFO
rm -f "$WORKDIR/VIDEO_TS"/VIDEO_TS.BUP
rm -f "$WORKDIR/VIDEO_TS"/VTS_??_?.VOB
rm -f "$WORKDIR/VIDEO_TS"/VTS_??_0.IFO
rm -f "$WORKDIR/VIDEO_TS"/VTS_??_0.BUP
rmdir "$WORKDIR/VIDEO_TS"
rmdir "$WORKDIR/AUDIO_TS"
rmdir "$WORKDIR"
fi