Skip to content

Instantly share code, notes, and snippets.

@noah
Created March 13, 2012 14:50
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save noah/2029239 to your computer and use it in GitHub Desktop.
Save noah/2029239 to your computer and use it in GitHub Desktop.
#!/bin/zsh
# simplify gnupod_addsong.pl syntax
#
# point it at a directory to add all .mp3 and .flac recursively
# - encodes flac to V0 (-x mp3 -e 0 flag)
if [ $# -eq 0 ]; then
echo "$0 <dir>"
exit -1
fi
unsetopt CASE_GLOB
while [ $# -gt 0 ]; do
find "$1" -type d | while read line; do
eval "gnupod_addsong.pl \"$line\"/*.mp3 2> /dev/null"
eval "gnupod_addsong.pl -x mp3 -e 0 \"$line\"/*.flac 2> /dev/null"
done
shift
done
mktunes.pl
df -h|grep ipod
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment