Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/lucperkins/git-license
https://github.com/lucperkins/git-license
Last synced: 3 months ago
JSON representation
- Host: GitHub
- URL: https://github.com/lucperkins/git-license
- Owner: lucperkins
- License: mit
- Created: 2014-01-03T23:21:58.000Z (about 11 years ago)
- Default Branch: master
- Last Pushed: 2018-05-29T18:57:09.000Z (over 6 years ago)
- Last Synced: 2024-10-11T23:39:53.464Z (4 months ago)
- Language: Shell
- Size: 8.79 KB
- Stars: 32
- Watchers: 3
- Forks: 3
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
git-license
===========> **DEPRECATION WARNING** --- Nowadays there are better tools for this. I can't recommend using this project anymore. Instead, check out [license](https://nishanths.github.io/license/), [legit](https://github.com/captainsafia/legit), or something else.
This is a simple shell script for adding the appropriate `LICENSE` to the root of your Git repository. The list of licenses is drawn from GitHub's [Choose a License](http://choosealicense.com/) page.
## Usage
Couldn't be much more simple. Just run the `git license` command and then the name of the license you wish to add, e.g.:
```bash
$ git license mit
```This will add the MIT License. For a list of available licenses, simply run the `git license` command by itself.
**Note**: If there's already a `LICENSE` file in the current directory, then running `git license` will overwrite it.
## Installation
As with any custom Git command, simply add the `git-license` file to any directory in your `PATH` and make it executable (e.g. via `chmod +x`). The following should work for you:
```
$ git clone https://github.com/lucperkins/git-license
$ cd git-license
$ sudo cp git-license /usr/bin/git-license # or another dir in your PATH
$ sudo chmod +x /usr/bin/git-license # or wherever you end putting it
```Alternatively, you can simply run the `init` script that comes with the repo:
```
sh init.sh
```That will do all of the work for you (which isn't very much!).
At that point, you should be able to use `license` like any other Git command.