process_dir(){ PWD="$(pwd)" if [[ "${source:0:1}" != "/" ]]; then source="$PWD/$source" fi if [[ "${target:0:1}" != "/" ]]; then target="$PWD/$target" fi cd$source for d in *; do if [ -d "$d" ] ; then echo"处理目录:$d" dest="$target/$d" if [ ! -d "$dest" ] ; thenmkdir -p "$dest"; fi cd$d takiyasha --np *.qmcflac -d "$dest" cd - fi done cd - }
process_dir(){ [ "$format" == "aac" ] && ext="m4a" || ext="$format" echo"ext:$ext" PWD="$(pwd)" if [[ "${source:0:1}" != "/" ]]; then source="$PWD/$source" fi if [[ "${target:0:1}" != "/" ]]; then target="$PWD/$target" fi cd$source for d in *; do if [ -d "$d" ] ; then echo"处理目录:$d" dest="$target/$d" if [ ! -d "$dest" ] ; thenmkdir -p "$dest"; fi cd"$d" #takiyasha --np *.qmcflac -d "$dest" for f in *.flac; do dest_filename="$dest/${f%.flac}.$ext" echo xld "$f" -f aac -o "$dest_filename" xld "$f" -f $format -o "$dest_filename" echo done cd - fi done cd - }
process_dir(){ PWD="$(pwd)" if [[ "${source:0:1}" != "/" ]]; then source="$PWD/$source" fi if [[ "${target:0:1}" != "/" ]]; then target="$PWD/$target" fi cd $source for d in *; do if [ -d "$d" ] ; then echo "处理目录:$d" newd=$(python3 $PINYIN "$d") dest="$target/$newd" if [ ! -d "$dest" ] ; then mkdir -p "$dest"; fi cd "$d" for f in *.$ext; do f2=${f#*-} newname=$(python3 $PINYIN "$f2") dest_filename="$dest/$newname" echo "$f: $dest_filename" #echo cp "$f" "$dest_filename" cp "$f""$dest_filename" done echo cd - fi done cd - }