Skip to content

Instantly share code, notes, and snippets.

@saltednut
Created February 17, 2016 22:47
Show Gist options
  • Save saltednut/11a37a39bcc3efb01d09 to your computer and use it in GitHub Desktop.
Save saltednut/11a37a39bcc3efb01d09 to your computer and use it in GitHub Desktop.
#!/usr/bin/env bash
FILE=$1.features.yml
ls -1 config/install > exported.yml
perl -pi -w -e 's/.yml//g;' exported.yml
awk '{print " - " $0;}' exported.yml > $FILE
perl -pi -e '$.=0 if eof;print "required:\n" if ($.==1)' $FILE
rm -r exported.yml
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment