aboutsummaryrefslogtreecommitdiff
path: root/release/scripts/mtree-to-plist.awk
diff options
context:
space:
mode:
authorBaptiste Daroussin <bapt@FreeBSD.org>2015-03-18 11:27:11 +0000
committerBaptiste Daroussin <bapt@FreeBSD.org>2015-03-18 11:27:11 +0000
commit6b710cc6fe1d5a04a17d775851dc27c519c7d910 (patch)
tree814d5eba91d90d1861031cee7780f06e1a979a14 /release/scripts/mtree-to-plist.awk
parent9269ba461b03c341f9dbc6459bbeefef29c20558 (diff)
downloadsrc-6b710cc6fe1d5a04a17d775851dc27c519c7d910.tar.gz
src-6b710cc6fe1d5a04a17d775851dc27c519c7d910.zip
development and profile are special tags and should always be the last component
of the name if present
Notes
Notes: svn path=/projects/release-pkg/; revision=280215
Diffstat (limited to 'release/scripts/mtree-to-plist.awk')
-rw-r--r--release/scripts/mtree-to-plist.awk18
1 files changed, 15 insertions, 3 deletions
diff --git a/release/scripts/mtree-to-plist.awk b/release/scripts/mtree-to-plist.awk
index e61805f2cd01..9aa172b79ddc 100644
--- a/release/scripts/mtree-to-plist.awk
+++ b/release/scripts/mtree-to-plist.awk
@@ -25,7 +25,7 @@
if (length(tags) == 0)
next
if (tags ~ /package=/) {
- ext = pkgname = ""
+ ext = pkgname = pkgend = ""
split(tags, a, ",");
for (i in a) {
if (a[i] ~ /^package=/) {
@@ -33,17 +33,29 @@
gsub(/package=/, "", pkgname)
} else if (a[i] == "config") {
type="config"
+ } else if (a[i] == "development" || a[i] == "profile") {
+ pkgend=a[i]
} else {
- ext=a[i]
+ if (ext != "")
+ ext=ext"-"a[i]
+ else
+ ext=a[i]
}
}
- if (length(ext) > 0) {
+ if (ext != "") {
if (pkgname == "runtime") {
pkgname=ext
} else {
pkgname=pkgname"-"ext
}
}
+ if (pkgend != "") {
+ if (pkgname == "runtime") {
+ pkgname=pkgend
+ } else {
+ pkgname=pkgname"-"pkgend
+ }
+ }
} else {
print "No packages specified in line: $0" > 2
next