Skip to content

Instantly share code, notes, and snippets.

@saltednut
Created February 17, 2016 22:47
Show Gist options
  • Select an option

  • Save saltednut/11a37a39bcc3efb01d09 to your computer and use it in GitHub Desktop.

Select an option

Save saltednut/11a37a39bcc3efb01d09 to your computer and use it in GitHub Desktop.

Revisions

  1. @brantwynn brantwynn created this gist Feb 17, 2016.
    8 changes: 8 additions & 0 deletions featurize-me-captain.sh
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,8 @@
    #!/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