Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
ViewLicense - A script to easily read the licenses for a pkg
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Documentation, Tips & Tricks
View previous topic :: View next topic  
Author Message
codergeek42
Bodhisattva
Bodhisattva


Joined: 05 Apr 2004
Posts: 5142
Location: Anaheim, CA (USA)

PostPosted: Tue Feb 01, 2005 5:13 am    Post subject: ViewLicense - A script to easily read the licenses for a pkg Reply with quote

It's my birthday today (:D) so I figured I'd give the Gentoo community (and other F/OSS users that visit this forum) a quick and easy way to view the specific licenses for a package.

I'm an advocate of F/OSS, so I don't like installing non-Free software unless I need to (I don't have the nVidia drivers and win32codecs installed). Many times I would find myself running various grep, awk, and sed commands to extract the LICENSE part of an ebuild and it's inherited eclass files, then open the resulting licenses in /usr/portage/licenses by hand. Well, I decided it would be quicker to write a small shell script to handle this and automate that LICENSE-reading process.

EDIT (2007-04-26): Ebuild no longer available. (I haven't used the peter.ramshacklestudios.com domain in over a year; sorry for not updating this...). I probably still have it somewhere if anyone is interested...

EDIT: Added ~amd64 to the KEYWORDS thanks to xerxian on IRC/#otw.

EDIT: Modified URI.

Then you can run "viewlicense.sh <package>" to view the various license(s) for a given package. These are My First Longer-Than-A-Few-Lines Shell Script(tm) and My First Ebuild(tm), so I probably messed up somewhere, but so far as I can tell things seem to work just fine. For example:
Code:
/home/peter $ viewlicense.sh sys-devel/gcc
>>> Locating ebuild... Done.
>>> Trying eclass files... Done.
gcc-3.4.3.20050110 uses the following 2 License(s):
  * GPL-2
  * LGPL-2.1
Code:
/home/peter $ viewlicense.sh xorg-x11 
>>> Locating ebuild... Done.
xorg-x11-6.8.1.902-r1 uses the following 10 License(s):
  * Adobe-X
  * CID
  * DEC
  * DEC-2
  * IBM-X
  * NVIDIA-X
  * NetBSD
  * SGI
  * UCB-LBL
  * XC-2
It will then go through each license and ask if you want to read it.

I hope this is useful to some of you!
_________________
~~ Peter: Programmer, Mathematician, STEM & Free Software Advocate, Enlightened Agent, Transhumanist, Fedora contributor
Who am I? :: EFF & FSF


Last edited by codergeek42 on Fri Apr 27, 2007 5:33 am; edited 2 times in total
Back to top
View user's profile Send private message
FonderiaDigitale
Veteran
Veteran


Joined: 06 Nov 2003
Posts: 1710
Location: Rome, Italy

PostPosted: Thu Feb 03, 2005 1:53 am    Post subject: Reply with quote

fine :)
please check the if-else cycle where it ask to see the license, it need and escape sequence if no response is given.

oh btw, i've reported this in the italian forum :)
_________________
Come disse un amico, i sistemisti sono un po' come gli artigiani per l'informatica :)
Back to top
View user's profile Send private message
codergeek42
Bodhisattva
Bodhisattva


Joined: 05 Apr 2004
Posts: 5142
Location: Anaheim, CA (USA)

PostPosted: Thu Feb 03, 2005 4:52 pm    Post subject: Reply with quote

FonderiaDigitale wrote:
fine :)
please check the if-else cycle where it ask to see the license, it need and escape sequence if no response is given.
I'm not sure I understand you here. If you don't enter anything, the script will act as if you had entered an 'n'.
Quote:
oh btw, i've reported this in the italian forum :)
Cool. Thanks. :)
_________________
~~ Peter: Programmer, Mathematician, STEM & Free Software Advocate, Enlightened Agent, Transhumanist, Fedora contributor
Who am I? :: EFF & FSF


Last edited by codergeek42 on Fri Apr 27, 2007 5:30 am; edited 1 time in total
Back to top
View user's profile Send private message
brenden
l33t
l33t


Joined: 09 Mar 2004
Posts: 710
Location: Calgary, AB

PostPosted: Fri Apr 27, 2007 5:17 am    Post subject: Reply with quote

I agree.
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Documentation, Tips & Tricks All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum