35 lines
517 B
Bash
Executable file
35 lines
517 B
Bash
Executable file
#!/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
|