pkgsrc-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[pkgsrc/trunk]: pkgsrc/mk/haskell Fix a bug in my previous commit
details: https://anonhg.NetBSD.org/pkgsrc/rev/5946117f2c5b
branches: trunk
changeset: 373136:5946117f2c5b
user: pho <pho%pkgsrc.org@localhost>
date: Mon Feb 07 02:43:42 2022 +0000
description:
Fix a bug in my previous commit
diffstat:
mk/haskell/build-type.awk | 11 ++++++++---
1 files changed, 8 insertions(+), 3 deletions(-)
diffs (37 lines):
diff -r 438eabc7f31a -r 5946117f2c5b mk/haskell/build-type.awk
--- a/mk/haskell/build-type.awk Mon Feb 07 02:39:41 2022 +0000
+++ b/mk/haskell/build-type.awk Mon Feb 07 02:43:42 2022 +0000
@@ -1,13 +1,15 @@
-# $NetBSD: build-type.awk,v 1.2 2022/02/07 02:39:41 pho Exp $
+# $NetBSD: build-type.awk,v 1.3 2022/02/07 02:43:42 pho Exp $
#
# Extract the field "Build-Type" out of a Cabal package description.
#
BEGIN {
buildTypeLine = 0
+ found = 0
}
tolower($1) ~ /^build-type:/ {
if ($2) {
+ found = 1;
print tolower($2);
exit
}
@@ -18,11 +20,14 @@
}
buildTypeLine {
+ found = 1;
print tolower($1);
exit
}
END {
- # The package description didn't have Build-Type. Default to "Simple".
- print "simple"
+ if (!found) {
+ # The package description didn't have Build-Type. Default to "Simple".
+ print "simple"
+ }
}
Home |
Main Index |
Thread Index |
Old Index