nsbin/rip-wave2ogg.doit

36 lines
517 B
Text
Raw Normal View History

2006-07-20 07:54:37 +00:00
#!/bin/sh
# Nico Schottelius
#
if [ $# -ne 2 ]; then
echo "me basedir filename: $#"
echo $@
exit 1
fi
# $1 = basedir
# $2 = filename
# pwd = current dir
BDIR="$1"
FILE="$2"
# wrong! wrong!
NEWFILE=`basename "$FILE" "$BDIR"`
#NEWFILE=`echo $FILE | sed "s,$BDIR/,," | sed "s,\$,.ogg,"`
echo $BDIR
echo $FILE
echo $NEWFILE
exit 0
if [ -d "$FILE" ]; then
echo "Creating $NEWFILE"
mkdir "$NEWFILE"
else
echo "Ripping $FILE to $NEWFILE..."
oggenc -o "$NEWFILE" "$FILE"
fi