ocarina/tests/gen_library.sh
Anna Schumaker 208e53c7e9 library: Update the code and unit test
Lots of changes here!  I switched from using track and library ids to
passing pointers, renamed some functions, and made the code much
cleaner.

Signed-off-by: Anna Schumaker <Anna@OcarinaProject.net>
2014-05-24 12:48:47 -04:00

27 lines
439 B
Bash
Executable File

#!/bin/bash
#
# Copyright 2013 (c) Anna Schumaker.
#
# Generate a test library in /tmp
#
# $1 - File, $2 - Directory number
function tag_file()
{
artist="Artist $2"
album="Album $2"
let date=2008+$2
vorbiscomment -w $1 -t "ARTIST=$artist" -t "ALBUM=$album" -t "DATE=$date"
}
mkdir -p /tmp/ocarina/dir{1..5}
for i in $(seq 5); do
cp tests/Music/* /tmp/ocarina/dir$i/
for f in /tmp/ocarina/dir$i/*; do
tag_file $f $i
done
done