views:

171

answers:

6

I've written some bash scripts (< 200 lines of code each) I wanna share with the world, but as I'm a FLOSS fan my first thought was to share them under the terms of the GPL.

But...is that nonsense? I mean, I understand why to share a whole application under the terms of the GPL, but does it make sense for such small scripts? Or would it be the best thing to share them as Public Domain, since they're nothing really special or fancy? Or is there any special kind of licensing 'treatment' for scripts out there?

I'd really appreciate some opinions on this matter, and thanks in advance.

Edit: Thanks to everyone for the answers...I wish I could accept more than one, because they all answered my question altogether!

+4  A: 

You can share anything under the GPL. "Hello World", even. It's a philosophical choice. If you don't mind someone taking these small scripts and redistributing them as closed source, make 'em public domain. If you do mind, make them GPL or something similar.

ceejayoz
You can't actually put Hello World under the GPL. It's not original, and therefore not eligible for copyright protection. Without copyright, you can't license it, not even under the GPL.
MSalters
Thank you very much, you really broadened my horizon a little. ;)
Bobby
@MSalters: at least in the EU, computer programs are exempt from the originality requirement. Now, trying to prove in court that *your* hello world is a derivative of *my* hello world is another matter entirely ...
Jörg W Mittag
@Jorg: No, you're wrong. "A computer program shall be protected if it is original ... " (from Council Directive 91/250/EEC of 14 May 1991 on the legal protection of computer programs, Article 1)
MSalters
@MSalters: You're right, that seems to be a German speciality (§69a, III UrhG).
Jörg W Mittag
Even that is arguable - the requirement that they have to be "Ergebnis der eigenen geistigen Schöpfung ihres Urhebers" (69a.3, result of the authors _own_ mental creation). A non-original work doesn't qualify for that.
MSalters
+1  A: 

If you donate them to the public domain, you're giving up any rights to their ownership, and you're allowing anyone to use, modify, or sell them however they please.

If you release them under GPL, you can also allow anyone to use, modify, or sell them, but you're also explicitly requiring them to provide the same unrestricted use to all "downstream" users. The spirit of GPL is that anyone who passes GPL software to anyone else must also provide the original rights and freedoms to use and further modify that software.


Disclaimer: This is my understanding of GPL, not legal advice. Dammit, Jim, I'm an engineer, not a lawyer.

Adam Liss
+1  A: 

Scripts are programs, and if you order programming languages based on how abstract they are, bash would be high in the ordering. It is valid to license bash code, and GPL is a fine choice.

rleir
A: 

As long as your new license type does not violate the conditions of the license that comes along with the BASH, you are ok :-)

initall
What? Bullshit. Code doesn't have to fall under the license of the interpreter, or every PHP app in existence would be open source.
ceejayoz
Here is smth. that makes ceejayoz point without the Bullshit word: http://www.gnu.org/licenses/gpl-faq.html#ReleaseUnderGPLAndNF
initall
Ok, you're right, there is a distinction to be made between modification and redistribution of GPL'ed software and creation of new software based on GPL-software. But don't mix licenses for your argument, as PHP is a BSD-style-license without the GNU-copyleft.
initall
+1  A: 

I love the GPL, but I have a simple rule for my own projects:

The Code should be at least one order of magnitude longer than the license

If your code is just as long as the GPL, there probably is not that much stuff in it that an evil corporation could steal, even if you license it under the MIT X11 License.

As for the question of Public Domain: I live in Germany, where the only legal way to put something in the Public Domain is to commit suicide and wait 70 years (and hope that copyright protection time doesn't get increased between now and 2080). Which is a commitment I am not wanting to make :-) So, I don't really think about that.

Jörg W Mittag
There's plenty of useful code shorter than the GPL. DeCSS is a great example: http://en.wikipedia.org/wiki/DeCSS
ceejayoz
I thought about something along these lines, but ceejayoz does also have a valid point, still +1 because it is true somehow.
Bobby
+1  A: 

It doesn't matter how trivial you believe the work to be; the question is whether it falls under copyright restriction or not. The default assumption is that yes, any creative work falls under copyright in just about any jurisdiction.

That's the same for a big program, a small script, an orchestral arrangement, or a sketch on a napkin.

In the absence of an explicit, effective grant of license, all rights are reserved to the copyright holder, which is you if you wrote it. So, like it or not, the burden of what freedoms to grant to others falls on your shoulders.

So, if you want recipients to have the essential software freedoms, the only way to make that happen is to choose a free-software license and grant it effectively. The GNU GPL gives good instruction on how to apply it to a work.

bignose
Not the only way. Putting code in the Public Domain grants the same freedoms. GPL's forte is in ensuring the conservation of those freedoms as others modify your code.
MSalters