]> git.phdru.name Git - audio-cdr-video.git/blob - audio/mp3/recode-tags-list.sh
Initail import
[audio-cdr-video.git] / audio / mp3 / recode-tags-list.sh
1 #! /bin/sh
2
3
4 if [ "$2" = "koi2win" ]; then
5    direction="$2"
6 elif [ "$2" = "win2koi" ]; then
7    direction="$2"
8 elif [ "$2" = "koi2utf" ]; then
9    direction="$2"
10 elif [ "$2" = "koi2utf8" ]; then
11    direction=koi2utf
12 elif [ "$2" = "win2utf" ]; then
13    direction="$2"
14 elif [ "$2" = "win2utf8" ]; then
15    direction=win2utf
16 else
17    echo "Usage: $0 playlist koi2win|win2koi|koi2utf|win2utf"
18    exit 1
19 fi
20
21 if [ "`wc -c \"$1\" | awk '{print $1}'`" -ge 10000 ]; then
22    echo "The file \`$1' is too big, probably not a playlist but mp3?"
23    exit 2
24 fi
25
26 PATH=$HOME/lib/audio/mp3:$PATH
27 umask 022
28
29 recode-tags.sh . $direction || exit 1
30 #if [ "$direction" = "koi2win" ]; then
31 #   exec towin "$1"
32 #elif [ "$direction" = "win2koi" ]; then
33 #   exec fromwin "$1"
34 #fi