Skip to content

Instantly share code, notes, and snippets.

@itiut
Last active December 6, 2016 05:18
Show Gist options
  • Save itiut/a7154b27cdfb2d639367bfb2245a0bc3 to your computer and use it in GitHub Desktop.
Save itiut/a7154b27cdfb2d639367bfb2245a0bc3 to your computer and use it in GitHub Desktop.
Generate a MIT License file named LICENSE.md
#!/bin/sh -eu
curl -s -H 'Accept:application/vnd.github.drax-preview+json' https://api.github.com/licenses/mit \
| jq -j '.body' \
| sed "s/\[year\]/$(date +%Y)/;s/\[fullname\]/$(git config --get user.name)/" \
> LICENSE.md
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment