OLD | NEW |
---|---|
1 #!/usr/bin/perl -w | 1 #!/usr/bin/perl -w |
2 # This script was originally based on the script of the same name from | 2 # This script was originally based on the script of the same name from |
3 # the KDE SDK (by dfaure@kde.org) | 3 # the KDE SDK (by dfaure@kde.org) |
4 # | 4 # |
5 # This version is | 5 # This version is |
6 # Copyright (C) 2007, 2008 Adam D. Barratt | 6 # Copyright (C) 2007, 2008 Adam D. Barratt |
7 # | 7 # |
8 # This program is free software; you can redistribute it and/or modify | 8 # This program is free software; you can redistribute it and/or modify |
9 # it under the terms of the GNU General Public License as published by | 9 # it under the terms of the GNU General Public License as published by |
10 # the Free Software Foundation; either version 2 of the License, or | 10 # the Free Software Foundation; either version 2 of the License, or |
(...skipping 414 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
425 } elsif ($licensetext =~ /may be distributed under the terms of the Q Public License as defined/) { | 425 } elsif ($licensetext =~ /may be distributed under the terms of the Q Public License as defined/) { |
426 $license = "QPL $license"; | 426 $license = "QPL $license"; |
427 } | 427 } |
428 | 428 |
429 if ($licensetext =~ /opensource\.org\/licenses\/mit-license\.php/) { | 429 if ($licensetext =~ /opensource\.org\/licenses\/mit-license\.php/) { |
430 $license = "MIT/X11 (BSD like) $license"; | 430 $license = "MIT/X11 (BSD like) $license"; |
431 } elsif ($licensetext =~ /Permission is hereby granted, free of charge, to a ny person obtaining a copy of this software and(\/or)? associated documentation files \(the (Software|Materials)\), to deal in the (Software|Materials)/) { | 431 } elsif ($licensetext =~ /Permission is hereby granted, free of charge, to a ny person obtaining a copy of this software and(\/or)? associated documentation files \(the (Software|Materials)\), to deal in the (Software|Materials)/) { |
432 $license = "MIT/X11 (BSD like) $license"; | 432 $license = "MIT/X11 (BSD like) $license"; |
433 } elsif ($licensetext =~ /Permission is hereby granted, without written agre ement and without license or royalty fees, to use, copy, modify, and distribute this software and its documentation for any purpose/) { | 433 } elsif ($licensetext =~ /Permission is hereby granted, without written agre ement and without license or royalty fees, to use, copy, modify, and distribute this software and its documentation for any purpose/) { |
434 $license = "MIT/X11 (BSD like) $license"; | 434 $license = "MIT/X11 (BSD like) $license"; |
435 } | 435 } elsif ($licensetext =~ /Permission to use, copy, modify, and distribute th is software for any purpose without fee is hereby granted/) { |
Paweł Hajdan Jr.
2011/12/02 11:00:53
Could you please show me the full text of the lice
GeorgeY
2011/12/02 17:21:05
/*
* The authors of this software are Rob Pike an
| |
436 » $license = "MIT/X11 (BSD like) $license"; | |
437 » } | |
Paweł Hajdan Jr.
2011/12/02 11:00:53
nit: This (only the last line) should be space-ind
GeorgeY
2011/12/02 17:21:05
Done.
| |
436 | 438 |
437 if ($licensetext =~ /Permission to use, copy, modify, and(\/or)? distribute this software for any purpose with or without fee is hereby granted, provided.* copyright notice.*permission notice.*all copies/) { | 439 if ($licensetext =~ /Permission to use, copy, modify, and(\/or)? distribute this software for any purpose with or without fee is hereby granted, provided.* copyright notice.*permission notice.*all copies/) { |
438 $license = "ISC $license"; | 440 $license = "ISC $license"; |
439 } | 441 } |
440 | 442 |
441 if ($licensetext =~ /THIS SOFTWARE IS PROVIDED .*AS IS AND ANY EXPRESS OR IM PLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCH ANTABILITY/) { | 443 if ($licensetext =~ /THIS SOFTWARE IS PROVIDED .*AS IS AND ANY EXPRESS OR IM PLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCH ANTABILITY/) { |
442 if ($licensetext =~ /All advertising materials mentioning features or us e of this software must display the following/) { | 444 if ($licensetext =~ /All advertising materials mentioning features or us e of this software must display the following/) { |
443 $license = "BSD (4 clause) $license"; | 445 $license = "BSD (4 clause) $license"; |
444 } elsif ($licensetext =~ /be used to endorse or promote products derived from this software/) { | 446 } elsif ($licensetext =~ /be used to endorse or promote products derived from this software/) { |
445 $license = "BSD (3 clause) $license"; | 447 $license = "BSD (3 clause) $license"; |
(...skipping 92 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
538 return $license; | 540 return $license; |
539 } | 541 } |
540 | 542 |
541 sub fatal($) { | 543 sub fatal($) { |
542 my ($pack,$file,$line); | 544 my ($pack,$file,$line); |
543 ($pack,$file,$line) = caller(); | 545 ($pack,$file,$line) = caller(); |
544 (my $msg = "$progname: fatal error at line $line:\n@_\n") =~ tr/\0//d; | 546 (my $msg = "$progname: fatal error at line $line:\n@_\n") =~ tr/\0//d; |
545 $msg =~ s/\n\n$/\n/; | 547 $msg =~ s/\n\n$/\n/; |
546 die $msg; | 548 die $msg; |
547 } | 549 } |
OLD | NEW |