Skip to content

Instantly share code, notes, and snippets.

@bamthomas
Created September 12, 2012 20:48
Show Gist options
  • Save bamthomas/3709807 to your computer and use it in GitHub Desktop.
Save bamthomas/3709807 to your computer and use it in GitHub Desktop.
#!/bin/bash
ORIGINAL=$1
mv $ORIGINAL/$ORIGINAL.jpg $ORIGINAL/cover.jpg
ALBUM_PATH=`echo $ORIGINAL | awk -F '-' '{print $1"/"$2}'`
mkdir -p "$ALBUM_PATH"
mv $ORIGINAL/* "$ALBUM_PATH/"
rmdir $ORIGINAL
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment