From: Jonatan L. <th...@ho...> - 2004-04-11 13:25:19
|
On Sun, 11 Apr 2004 14:08:11 +0200 Nuno Alexandre <na...@fl...> wrote: > On Sun, 11 Apr 2004 12:16:05 +0100 > Stephen Watson wrote: > > > cd `dirname "$@"` > > right .. i can't get this to work .. i did manager to get it running > but with no terminal open .. which isn't very nice as i would like to > see how long the process have reached. > > like it is now, it's not working at all ... ... Wow, that looked strange. =) Try this instead: make a new file: YourAppDir/convert_and_burn.sh: #!/bin/sh DEVICE="/dev/hdc" cd $(dirname "$1") echo "### Renaming all files to non-space lowercase... ###" for i in *.[Mm][Pp]3; do mv -v "$i" $(echo "$i" | tr ' ' '_' | tr '[A-Z]' '[a-z]' ) done echo "### Decoding to .WAV and normalizing... ###" for i in *.mp3; do lame --decode $i $(basename $i .mp3).wav normalize -m $i done echo "### Writing all .WAVs to CDR... ###" cdrecord dev=$DEVICE -eject speed=16 -pad -audio *.wav echo "### DONE. You can now close this window. ###" and the YourAppDir/AppRun script: #!/bin/sh exec aterm -e $(dirname "$0")/convert_and_burn.sh NOTE: Don't forget to chmod +x convert_and_burn.sh NOTE2: Why must you rename the files? /Jonatan __ | __ ____ _ ____ |__/__ _____ _____||___ (_) ____ _____| | )(_____|( | )(_____||_____ | (______(_____| ===============|===================================== __| http://kymatica.com |