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 416 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
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 } |
436 | 436 |
| 437 if ($licensetext =~ /This file is distributed under the University of Illin
ois Open Source License/){ |
| 438 $license = "University of Illinois/NCSA Open Source License (BSD like) $
license"; |
| 439 } |
| 440 |
437 if ($licensetext =~ /Permission to use, copy, modify, and(\/or)? distribute
this software (and its documentation )?for any purpose (with or )?without fee i
s hereby granted, provided.*(copyright|entire) notice.*all copies/) { | 441 if ($licensetext =~ /Permission to use, copy, modify, and(\/or)? distribute
this software (and its documentation )?for any purpose (with or )?without fee i
s hereby granted, provided.*(copyright|entire) notice.*all copies/) { |
438 $license = "ISC $license"; | 442 $license = "ISC $license"; |
439 } | 443 } |
440 | 444 |
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/ || | 445 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 $licensetext =~ /THE SOFTWARE IS PROVIDED AS IS, WITHOUT WARRANTY OF ANY
KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHA
NTABIL- ITY/) { | 446 $licensetext =~ /THE SOFTWARE IS PROVIDED AS IS, WITHOUT WARRANTY OF ANY
KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHA
NTABIL- ITY/) { |
443 if ($licensetext =~ /All advertising materials mentioning features or us
e of this software must display the following/) { | 447 if ($licensetext =~ /All advertising materials mentioning features or us
e of this software must display the following/) { |
444 $license = "BSD (4 clause) $license"; | 448 $license = "BSD (4 clause) $license"; |
445 } elsif ($licensetext =~ /be used to endorse or promote products derived
from this software/) { | 449 } elsif ($licensetext =~ /be used to endorse or promote products derived
from this software/) { |
446 $license = "BSD (3 clause) $license"; | 450 $license = "BSD (3 clause) $license"; |
(...skipping 100 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
547 return $license; | 551 return $license; |
548 } | 552 } |
549 | 553 |
550 sub fatal($) { | 554 sub fatal($) { |
551 my ($pack,$file,$line); | 555 my ($pack,$file,$line); |
552 ($pack,$file,$line) = caller(); | 556 ($pack,$file,$line) = caller(); |
553 (my $msg = "$progname: fatal error at line $line:\n@_\n") =~ tr/\0//d; | 557 (my $msg = "$progname: fatal error at line $line:\n@_\n") =~ tr/\0//d; |
554 $msg =~ s/\n\n$/\n/; | 558 $msg =~ s/\n\n$/\n/; |
555 die $msg; | 559 die $msg; |
556 } | 560 } |
OLD | NEW |