FAQ Search Today's Posts Mark Forums Read
» Video Reviews

» Linux Archive

Linux-archive is a website aiming to archive linux email lists and to make them easily accessible for linux users/developers.


» Sponsor

» Partners

» Sponsor

Go Back   Linux Archive > ArchLinux > ArchLinux Pacman Development

 
 
LinkBack Thread Tools
 
Old 01-07-2012, 05:27 PM
Dave Reisner
 
Default makepkg: abstract license check into separate function

Signed-off-by: Dave Reisner <dreisner@archlinux.org>
---
scripts/makepkg.sh.in | 16 ++++++++++------
1 files changed, 10 insertions(+), 6 deletions(-)

diff --git a/scripts/makepkg.sh.in b/scripts/makepkg.sh.in
index 13185ee..eada195 100644
--- a/scripts/makepkg.sh.in
+++ b/scripts/makepkg.sh.in
@@ -1102,6 +1102,15 @@ find_libprovides() {
done
}

+check_license() {
+ # TODO maybe remove this at some point
+ # warn if license array is not present or empty
+ if [[ -z $license ]]; then
+ warning "$(gettext "Please add a license line to your %s!")" "$BUILDSCRIPT"
+ plain "$(gettext "Example for GPL'ed software: %s.")" "license=('GPL')"
+ fi
+}
+
write_pkginfo() {
local builddate=$(date -u "+%s")
if [[ -n $PACKAGER ]]; then
@@ -1179,12 +1188,7 @@ write_pkginfo() {
fi
done

- # TODO maybe remove this at some point
- # warn if license array is not present or empty
- if [[ -z $license ]]; then
- warning "$(gettext "Please add a license line to your %s!")" "$BUILDSCRIPT"
- plain "$(gettext "Example for GPL'ed software: %s.")" "license=('GPL')"
- fi
+ check_license
}

check_package() {
--
1.7.8.1
 

Thread Tools




All times are GMT. The time now is 08:05 PM.

VBulletin, Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2007, Crawlability, Inc.
Copyright 2007 - 2008, www.linux-archive.org