Skip to content

Instantly share code, notes, and snippets.

@mokele
Created April 19, 2011 09:57
Show Gist options
  • Save mokele/927081 to your computer and use it in GitHub Desktop.
Save mokele/927081 to your computer and use it in GitHub Desktop.
#!/bin/bash
ARTIST=`echo $@ | cut -d/ -f6`
ALBUM=`echo $@ | cut -d/ -f7`
ARTIST="$(echo $ARTIST | sed 's/+/ /g;s/%\(..\)/\\x\1/g;')"
ALBUM="$(echo $ALBUM | sed 's/+/ /g;s/%\(..\)/\\x\1/g;')"
ARTIST=`echo -n -e $ARTIST`
ALBUM=`echo -n -e $ALBUM`
(mkdir -p "$ARTIST" && \
mkdir -p "$ARTIST/$ALBUM" && \
cd "$ARTIST/$ALBUM" && \
wget -r -l1 -H -t1 -nd -N -np -A.mp3 -erobots=off -i $@)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment