summaryrefslogtreecommitdiffstats
path: root/scripts/makepkg.sh.in
diff options
context:
space:
mode:
authorDave Reisner <dreisner@archlinux.org>2012-01-07 13:25:24 -0500
committerDave Reisner <dreisner@archlinux.org>2012-01-23 13:34:28 -0500
commit225ee71cae95197d4e473488f94f628683d2a5e7 (patch)
treea52d04ede015e2463e4f24e712f3fcb2d06cdcb1 /scripts/makepkg.sh.in
parentbe038f9cb2d4302d74c0edadd9abf2b282adc7c3 (diff)
downloadpacman-225ee71cae95197d4e473488f94f628683d2a5e7.tar.xz
makepkg: abstract license check into separate function
Signed-off-by: Dave Reisner <dreisner@archlinux.org>
Diffstat (limited to 'scripts/makepkg.sh.in')
-rw-r--r--scripts/makepkg.sh.in16
1 files changed, 10 insertions, 6 deletions
diff --git a/scripts/makepkg.sh.in b/scripts/makepkg.sh.in
index c761a098..80e47624 100644
--- a/scripts/makepkg.sh.in
+++ b/scripts/makepkg.sh.in
@@ -1109,6 +1109,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
@@ -1186,12 +1195,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() {