Snip2Code is shutting down.
It has been quite a ride, since 2013 when we launched our first prototype: thanks to the effort of you guys we collected more than 3 million snippets!
We are very proud to help all our users to be more efficient in their jobs, and to be the central point to share programming knowledge for everyone.
Our basic service is free, so we always survived on our own resources to give you Snip2Code.
Unfortunately, we are no more in the financial position to sustain this effort, and therefore we are announcing here our permanent shut down,
which will take place on August 1st, 2020.
Please save your private snippets using our backup function in the settings, here.
This will allow us to pay for the servers and the infrastructure. If you want to donate, Contact Us!
3 7
Top 1% !
Popularity: 4246th place

Published on:

No tags for this snippet yet.

Generate a MIT LICENSE file via a bash shell script.

Generate a MIT LICENSE file via a bash shell script.: 
Copy Embed Code
<iframe id="embedFrame" style="width:600px; height:300px;"
Click on the embed code to copy it into your clipboard Width Height
Leave empty to retrieve all the content Start End
#!/bin/bash # ------------------------------------------------------- # A shell script that generates a MIT LICENSE file # Written by: Tom Stewart # Last updated on: 2013/15/08 # ------------------------------------------------------- # Verify the type of input and number of values USAGE="USAGE: $0 copyright_year copyright_holders" [ $# -eq 0 ] && { echo ""; echo $USAGE; echo ""; exit 1; } if [ $# -eq 1 ] ; then exec >&2; echo ""; echo $USAGE if ! [[ "$1" =~ ^[0-9]+$ ]] ; then echo " ERROR: copyright_year is missing, or is not a number" else echo " ERROR: copyright_holders is missing." fi echo ""; exit 1 fi # Set vars COPYRIGHT_YEAR=$1 # 1st command line argument COPYRIGHT_HOLDERS=$2 # Source: cat > LICENSE << EOF The MIT License (MIT) Copyright (c) $COPYRIGHT_YEAR $COPYRIGHT_HOLDERS Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. EOF
If you want to be updated about similar snippets, Sign in and follow our Channels

blog comments powered by Disqus