Skip to content

Instantly share code, notes, and snippets.

@dedeibel
Created April 6, 2016 15:15
Show Gist options
  • Save dedeibel/bdded145138a60fabd067e12c6a6a548 to your computer and use it in GitHub Desktop.
Save dedeibel/bdded145138a60fabd067e12c6a6a548 to your computer and use it in GitHub Desktop.
Extracts play (1.2) Database evolution script "Up" Parts from the evolution files
cd conf/evolutions/default
mkdir ../extracted
for i in *.sql ; do awk '/# --- !Ups/{flag=1;next}/# --- !Downs/{flag=0}flag' "$i" > ../extracted/"$i" ; done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment