summaryrefslogtreecommitdiffstats
path: root/bin/templ
diff options
context:
space:
mode:
authorJustin Davis <jrcd83@gmail.com>2011-09-01 23:08:26 +0200
committerJustin Davis <jrcd83@gmail.com>2011-09-01 23:08:26 +0200
commitc22f17f056a416af601f260f488fe150d44f24d2 (patch)
tree29b907e9e4620a91ae6e6498ea68561fb3467093 /bin/templ
parent1ec36ebc97a6c546d1ef0acc545d4636d36b89a1 (diff)
downloadgenpkg-c22f17f056a416af601f260f488fe150d44f24d2.tar.gz
genpkg-c22f17f056a416af601f260f488fe150d44f24d2.tar.xz
Make sure pkgver and distdir are defined in perl-pkg.
Diffstat (limited to 'bin/templ')
-rwxr-xr-xbin/templ/perl-pkg3
1 files changed, 3 insertions, 0 deletions
diff --git a/bin/templ/perl-pkg b/bin/templ/perl-pkg
index b09dc3f..b008cbd 100755
--- a/bin/templ/perl-pkg
+++ b/bin/templ/perl-pkg
@@ -76,6 +76,9 @@ sub mungevars
# Replace version string in 'source' entry & 'distdir' with
# $pkgver parameter.
+ for my $v (qw/pkgver distdir/) {
+ die "$0: $v is undefined" unless defined $vars->{$v}[0];
+ }
my $ver = $vars->{'pkgver'}[0];
s/\Q$ver\E/\${pkgver}/g for ($vars->{'source'}[0], $vars->{'distdir'}[0]);