Skip to content

Instantly share code, notes, and snippets.

@passcod
Last active August 29, 2015 14:23
Show Gist options
  • Save passcod/cdbe5f26d8c0c6b19376 to your computer and use it in GitHub Desktop.
Save passcod/cdbe5f26d8c0c6b19376 to your computer and use it in GitHub Desktop.
#!/usr/bin/bash
file="CODE_OF_CONDUCT.md"
gitroot="$(git rev-parse --show-toplevel)"
if [[ -z "$gitroot" ]]; then
exit
fi
cd "$gitroot"
url="http://contributor-covenant.org/version/1/1/0/code_of_conduct.md"
wget -O "$file" "$url"
git add "$file"
git commit -m 'Add Code of Conduct' "$file"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment