diff options
author | bapt <bapt@FreeBSD.org> | 2015-03-18 11:27:11 +0000 |
---|---|---|
committer | bapt <bapt@FreeBSD.org> | 2015-03-18 11:27:11 +0000 |
commit | 18c2bb41e133fc297a528bf214c52239ad4a3198 (patch) | |
tree | 814d5eba91d90d1861031cee7780f06e1a979a14 /release/scripts/mtree-to-plist.awk | |
parent | 9c739606941f3b6a7a64c882d62ca753cfadfd07 (diff) | |
download | FreeBSD-src-18c2bb41e133fc297a528bf214c52239ad4a3198.zip FreeBSD-src-18c2bb41e133fc297a528bf214c52239ad4a3198.tar.gz |
development and profile are special tags and should always be the last component
of the name if present
Diffstat (limited to 'release/scripts/mtree-to-plist.awk')
-rw-r--r-- | release/scripts/mtree-to-plist.awk | 18 |
1 files changed, 15 insertions, 3 deletions
diff --git a/release/scripts/mtree-to-plist.awk b/release/scripts/mtree-to-plist.awk index e61805f..9aa172b 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 |